Skip to content

Commit 366d2a3

Browse files
committed
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.
1 parent 5654912 commit 366d2a3

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,15 +3360,6 @@ getPublications(Archive *fout)
33603360

33613361
ntups = PQntuples(res);
33623362

3363-
if (ntups == 0)
3364-
{
3365-
/*
3366-
* There are no publications defined. Clean up and return.
3367-
*/
3368-
PQclear(res);
3369-
return;
3370-
}
3371-
33723363
i_tableoid = PQfnumber(res, "tableoid");
33733364
i_oid = PQfnumber(res, "oid");
33743365
i_pubname = PQfnumber(res, "pubname");
@@ -3637,15 +3628,6 @@ getSubscriptions(Archive *fout)
36373628

36383629
ntups = PQntuples(res);
36393630

3640-
if (ntups == 0)
3641-
{
3642-
/*
3643-
* There are no subscriptions defined. Clean up and return.
3644-
*/
3645-
PQclear(res);
3646-
return;
3647-
}
3648-
36493631
i_tableoid = PQfnumber(res, "tableoid");
36503632
i_oid = PQfnumber(res, "oid");
36513633
i_subname = PQfnumber(res, "subname");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy