pgsql: Fix various memory leaks in psql's describe commands \d* - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Fix various memory leaks in psql's describe commands \d*
Date
Msg-id E1oELDB-000VRI-S7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix various memory leaks in psql's describe commands \d*

Most of these have been introduced in d2d3547 with the new pattern
validation logic, and would leak memory worth an amount of one
PQExpBuffer each time (as of 256 bytes at minimum, possibly more).

Most of the patch has been written by Tang Haiying, with a few tweaks
coming from Álvaro Herrera.

Reported-by: Tang Haiying
Author: Tang Haiying, Álvaro Herrera
Reviewed-by: Mark Dilger, Andres Freund, Álvaro Herrera, Tom Lane, Japin
Li, Michael Paquier, Junwang Zhao
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/171ab95f64493f30dccf34bb1cafaa7b4957cd4e

Modified Files
--------------
src/bin/psql/describe.c | 235 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 190 insertions(+), 45 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Dump more fields when dumping planner internal data structures.
Next
From: Michael Paquier
Date:
Subject: pgsql: Tweak a bit the new TAP tests of REINDEX DATABASE/SYSTEM