- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0e60607
committed
ecpg: fix some memory leakage of data-type-related structures.
ECPGfree_type() and related functions were quite incompleteabout removing subsidiary data structures. Possibly this isbecause ecpg wasn't careful to make sure said data structuresalways had their own storage. Previous patches in this seriescleaned up a lot of that, and I had to add a couple moremm_strdup's here.Also, ecpg.trailer tended to overwrite struct_member_list[struct_level]without bothering to free up its previous contents, thus potentiallyleaking a lot of struct-member-related storage. AddECPGfree_struct_member() calls at appropriate points.Discussion:https://postgr.es/m/2011420.1713493114@sss.pgh.pa.us1 parent5c32c21 commit0e60607
File tree
5 files changed
+42
-13
lines changed- src/interfaces/ecpg/preproc
5 files changed
+42
-13
lines changedLines changed: 15 additions & 2 deletions
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 |
| |
|
Lines changed: 9 additions & 2 deletions
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 |
| |
|
Lines changed: 9 additions & 6 deletions
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 |
| |
|
Lines changed: 3 additions & 2 deletions
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 |
| |
|
Lines changed: 6 additions & 1 deletion
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
Comments
(0)