pgsql: Free temporary memory when reading TOC

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Free temporary memory when reading TOC
Дата
Msg-id E1nHmnB-0004c6-Ng@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Free temporary memory when reading TOC

ReadStr returns allocated memory which the caller is responsible for
freeing when done with the string. This commit ensures that memory is
freed in one case which used ReadStr in a conditional. While the leak
might not be too concerning, this makes the code consistent across all
ReadStr callsites in ReadToc. Due to the lack of complaints of issues
in production from this, no backpatch is performed at this point.

Author: Bharath Rupireddy, Georgios Kokolatos
Reviewed-by: Kyotaro Horiguchi
Discussion:
https://postgr.es/m/oZwKiUxFsVaetG2xOJp7Hwao8F1AKIdfFDQLNJrnwoaxmjyB-45r_aYmhgXHKLcMI3GT24m9L6HafSi2ns7WFxXe0mw2_tIJpD-Z3vb_eyI=@pm.me

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a29217a00a34162ca0ffac336d83f28132330a6

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Retire src/backend/utils/misc/check_guc
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Fix typo in archive modules docs