projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
540c39c
)
pg_dump: Fix memory leak in dumpSequenceData().
author
Nathan Bossart
<nathan@postgresql.org>
Sun, 11 Jan 2026 19:52:50 +0000
(13:52 -0600)
committer
Nathan Bossart
<nathan@postgresql.org>
Sun, 11 Jan 2026 19:52:50 +0000
(13:52 -0600)
Oversight in commit
7a485bd641
. Per Coverity.
Backpatch-through: 18
src/bin/pg_dump/pg_dump.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_dump.c
b/src/bin/pg_dump/pg_dump.c
index b9e0edf8755122485a3937ef67d4a8a681cfbcd8..328a1bad21b30bd9f68e2b21133ae1f7797054c7 100644
(file)
--- a/
src/bin/pg_dump/pg_dump.c
+++ b/
src/bin/pg_dump/pg_dump.c
@@
-19230,12
+19230,14
@@
dumpSequenceData(Archive *fout, const TableDataInfo *tdinfo)
TableInfo *tbinfo = tdinfo->tdtable;
int64 last;
bool called;
- PQExpBuffer query
= createPQExpBuffer()
;
+ PQExpBuffer query;
/* needn't bother if not dumping sequence data */
if (!fout->dopt->dumpData && !fout->dopt->sequence_data)
return;
+ query = createPQExpBuffer();
+
/*
* For versions >= 18, the sequence information is gathered in the sorted
* array before any calls to dumpSequenceData(). See collectSequences()