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

Commit9747a98

Browse files
committed
Add missing PQclear() calls into pg_receivexlog.
Back-patch to 9.3.
1 parent39217ce commit9747a98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/bin/pg_basebackup/receivelog.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
680680
fprintf(stderr,
681681
_("%s: unexpected termination of replication stream: %s"),
682682
progname,PQresultErrorMessage(res));
683+
PQclear(res);
683684
gotoerror;
684685
}
685686
PQclear(res);
@@ -694,6 +695,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
694695
}
695696
elseif (PQresultStatus(res)==PGRES_COMMAND_OK)
696697
{
698+
PQclear(res);
699+
697700
/*
698701
* End of replication (ie. controlled shut down of the server).
699702
*
@@ -715,6 +718,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
715718
fprintf(stderr,
716719
_("%s: unexpected termination of replication stream: %s"),
717720
progname,PQresultErrorMessage(res));
721+
PQclear(res);
718722
gotoerror;
719723
}
720724
}
@@ -925,6 +929,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
925929
PQclear(res);
926930
gotoerror;
927931
}
932+
PQclear(res);
928933
res=PQgetResult(conn);
929934
}
930935
still_sending= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp