Commit 0e60607
committed
ecpg: fix some memory leakage of data-type-related structures.
ECPGfree_type() and related functions were quite incomplete
about removing subsidiary data structures. Possibly this is
because ecpg wasn't careful to make sure said data structures
always had their own storage. Previous patches in this series
cleaned up a lot of that, and I had to add a couple more
mm_strdup's here.
Also, ecpg.trailer tended to overwrite struct_member_list[struct_level]
without bothering to free up its previous contents, thus potentially
leaking a lot of struct-member-related storage. Add
ECPGfree_struct_member() calls at appropriate points.
Discussion: https://postgr.es/m/2011420.1713493114@sss.pgh.pa.us1 parent 5c32c21 commit 0e60607
File tree
5 files changed
+42
-13
lines changed- src/interfaces/ecpg/preproc
5 files changed
+42
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| |||
507 | 519 | | |
508 | 520 | | |
509 | 521 | | |
| 522 | + | |
510 | 523 | | |
511 | 524 | | |
512 | 525 | | |
513 | 526 | | |
514 | | - | |
| 527 | + | |
515 | 528 | | |
516 | 529 | | |
517 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
758 | 759 | | |
759 | 760 | | |
760 | 761 | | |
| |||
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
| 886 | + | |
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
| |||
904 | 906 | | |
905 | 907 | | |
906 | 908 | | |
| 909 | + | |
907 | 910 | | |
908 | 911 | | |
909 | 912 | | |
| |||
913 | 916 | | |
914 | 917 | | |
915 | 918 | | |
| 919 | + | |
916 | 920 | | |
917 | 921 | | |
918 | 922 | | |
| |||
928 | 932 | | |
929 | 933 | | |
930 | 934 | | |
| 935 | + | |
931 | 936 | | |
932 | 937 | | |
933 | 938 | | |
| |||
969 | 974 | | |
970 | 975 | | |
971 | 976 | | |
| 977 | + | |
972 | 978 | | |
973 | 979 | | |
974 | 980 | | |
975 | 981 | | |
976 | | - | |
977 | | - | |
| 982 | + | |
| 983 | + | |
978 | 984 | | |
979 | 985 | | |
980 | 986 | | |
| |||
984 | 990 | | |
985 | 991 | | |
986 | 992 | | |
| 993 | + | |
987 | 994 | | |
988 | 995 | | |
989 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
625 | | - | |
| 626 | + | |
626 | 627 | | |
627 | 628 | | |
628 | 629 | | |
| |||
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
646 | | - | |
647 | | - | |
| 647 | + | |
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
665 | 668 | | |
666 | 669 | | |
667 | 670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
| |||
0 commit comments