pgsql: ecpg: fix some memory leakage of data-type-related structures.
От | Tom Lane |
---|---|
Тема | pgsql: ecpg: fix some memory leakage of data-type-related structures. |
Дата | |
Msg-id | E1tGMBV-003mYZ-2d@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
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.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0e6060790d6533847084770845c84e81862bff47 Modified Files -------------- src/interfaces/ecpg/preproc/ecpg.header | 17 +++++++++++++++-- src/interfaces/ecpg/preproc/ecpg.trailer | 11 +++++++++-- src/interfaces/ecpg/preproc/type.c | 15 +++++++++------ src/interfaces/ecpg/preproc/type.h | 5 +++-- src/interfaces/ecpg/preproc/variable.c | 7 ++++++- 5 files changed, 42 insertions(+), 13 deletions(-)
В списке pgsql-committers по дате отправления: