pgsql: Avoid memory leak on error while parsing pg_stat_statements dump
pgsql: Avoid memory leak on error while parsing pg_stat_statements dump
От:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Дата:
Avoid memory leak on error while parsing pg_stat_statements dump file By using palloc() instead of raw malloc(). Reported-by: Gaurav Singh Reviewed-by: Lukas Fittl Reviewed-by: Daniel Gustafsson Discussion: https://www.postgresql.org/message-id/CAEcQ1bYR9s4eQLFDjzzJHU8fj-MTbmRpW-9J-r2gsCn+HEsynw@mail.gmail.com Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/52edaf9d9b0231700f97bd13c6860dc63b9b2eff Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)