mirror of
https://github.com/postgres/postgres.git
synced 2026-07-16 05:02:57 -04:00
pg_dump: Fix minor memory leak
Missing a destroyPQExpBuffer() in the early exit branch. The early exits aren't really necessary. Most similar functions just proceed running the rest of the code zero times and clean up at the end.
This commit is contained in:
parent
5654912907
commit
366d2a3d88
1 changed files with 0 additions and 18 deletions
|
|
@ -3360,15 +3360,6 @@ getPublications(Archive *fout)
|
|||
|
||||
ntups = PQntuples(res);
|
||||
|
||||
if (ntups == 0)
|
||||
{
|
||||
/*
|
||||
* There are no publications defined. Clean up and return.
|
||||
*/
|
||||
PQclear(res);
|
||||
return;
|
||||
}
|
||||
|
||||
i_tableoid = PQfnumber(res, "tableoid");
|
||||
i_oid = PQfnumber(res, "oid");
|
||||
i_pubname = PQfnumber(res, "pubname");
|
||||
|
|
@ -3637,15 +3628,6 @@ getSubscriptions(Archive *fout)
|
|||
|
||||
ntups = PQntuples(res);
|
||||
|
||||
if (ntups == 0)
|
||||
{
|
||||
/*
|
||||
* There are no subscriptions defined. Clean up and return.
|
||||
*/
|
||||
PQclear(res);
|
||||
return;
|
||||
}
|
||||
|
||||
i_tableoid = PQfnumber(res, "tableoid");
|
||||
i_oid = PQfnumber(res, "oid");
|
||||
i_subname = PQfnumber(res, "subname");
|
||||
|
|
|
|||
Loading…
Reference in a new issue