[MASSMAIL] pgsql: Fix some memory leaks associated with parsing json and manifests

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема [MASSMAIL] pgsql: Fix some memory leaks associated with parsing json and manifests
Дата
Msg-id E1rvIN6-001knn-1H@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix some memory leaks associated with parsing json and manifests

Coverity complained about not freeing some memory associated with
incrementally parsing backup manifests. To fix that, provide and use a new
shutdown function for the JsonManifestParseIncrementalState object, in
line with a suggestion from Tom Lane.

While analysing the problem, I noticed a buglet in freeing memory for
incremental json lexers. To fix that remove a bogus condition on
freeing the memory allocated for them.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/661ab4e185784db79c194b5758555b1db3f30483

Modified Files
--------------
src/backend/backup/basebackup_incremental.c |  3 +++
src/bin/pg_combinebackup/load_manifest.c    |  3 +++
src/bin/pg_verifybackup/pg_verifybackup.c   |  3 +++
src/common/jsonapi.c                        | 21 ++++++++++-----------
src/common/parse_manifest.c                 | 13 ++++++++++++-
src/include/common/parse_manifest.h         |  1 +
6 files changed, 32 insertions(+), 12 deletions(-)


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

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Fix recently introduced typo in code comment
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: [MASSMAIL]pgsql: Move libpq encryption negotiation tests