Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit366d2a3

Browse files
committed
pg_dump: Fix minor memory leak
Missing a destroyPQExpBuffer() in the early exit branch. The earlyexits aren't really necessary. Most similar functions just proceedrunning the rest of the code zero times and clean up at the end.
1 parent5654912 commit366d2a3

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)

[8]ページ先頭

©2009-2025 Movatter.jp