mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
pg_dump: Fix memory leak in dumpSequenceData().
Oversight in commit 7a485bd641. Per Coverity.
Backpatch-through: 18
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user