aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-01-23 08:28:39 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-01-23 08:28:39 -0500
commit366d2a3d8808ad92436a830c32e73ce17affe5b6 (patch)
treee1ef53d4c5e5fcf31e7a6ec44ef597d1010a2b48 /src
parent56549129079465a9d25fd6e5abc1439363922b7c (diff)
downloadpostgresql-366d2a3d8808ad92436a830c32e73ce17affe5b6.tar.gz
postgresql-366d2a3d8808ad92436a830c32e73ce17affe5b6.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 6cbefac250f..049c9cdfd7e 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -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");