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

Commitb819dd7

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

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
@@ -628,6 +628,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
628628
fprintf(stderr,
629629
_("%s: unexpected termination of replication stream: %s"),
630630
progname,PQresultErrorMessage(res));
631+
PQclear(res);
631632
gotoerror;
632633
}
633634
PQclear(res);
@@ -642,6 +643,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
642643
}
643644
elseif (PQresultStatus(res)==PGRES_COMMAND_OK)
644645
{
646+
PQclear(res);
647+
645648
/*
646649
* End of replication (ie. controlled shut down of the server).
647650
*
@@ -663,6 +666,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
663666
fprintf(stderr,
664667
_("%s: unexpected termination of replication stream: %s"),
665668
progname,PQresultErrorMessage(res));
669+
PQclear(res);
666670
gotoerror;
667671
}
668672
}
@@ -839,6 +843,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
839843
PQclear(res);
840844
gotoerror;
841845
}
846+
PQclear(res);
842847
res=PQgetResult(conn);
843848
}
844849
still_sending= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp