aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-10-24 12:38:26 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-10-24 12:38:26 -0400
commit70bef494000e4dbbeca0f0a40347ca1747aea701 (patch)
tree742fc436e8ce69a98ab69d5632e56ee64c525196 /src/backend/access/transam/xlog.c
parentb3b4d8e68ae83f432f43f035c7eb481ef93e1583 (diff)
downloadpostgresql-70bef494000e4dbbeca0f0a40347ca1747aea701.tar.gz
postgresql-70bef494000e4dbbeca0f0a40347ca1747aea701.zip
Fix minor memory leaks in pg_dump.
I found these by running pg_dump under "valgrind --leak-check=full". The changes in flagInhIndexes() and getIndexes() replace allocation of an array of which we use only some elements by individual allocations of just the actually-needed objects. The previous coding wasted some memory, but more importantly it confused valgrind's leak tracking. collectComments() and collectSecLabels() remain major blots on the valgrind report, because they don't PQclear their query results, in order to avoid a lot of strdup's. That's a dubious tradeoff, but I'll leave it alone here; an upcoming patch will modify those functions enough to justify changing the tradeoff.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
0 files changed, 0 insertions, 0 deletions