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

Commit7cf7dc7

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

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
@@ -626,6 +626,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
626626
fprintf(stderr,
627627
_("%s: unexpected termination of replication stream: %s"),
628628
progname,PQresultErrorMessage(res));
629+
PQclear(res);
629630
gotoerror;
630631
}
631632
PQclear(res);
@@ -640,6 +641,8 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
640641
}
641642
elseif (PQresultStatus(res)==PGRES_COMMAND_OK)
642643
{
644+
PQclear(res);
645+
643646
/*
644647
* End of replication (ie. controlled shut down of the server).
645648
*
@@ -661,6 +664,7 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
661664
fprintf(stderr,
662665
_("%s: unexpected termination of replication stream: %s"),
663666
progname,PQresultErrorMessage(res));
667+
PQclear(res);
664668
gotoerror;
665669
}
666670
}
@@ -871,6 +875,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
871875
PQclear(res);
872876
gotoerror;
873877
}
878+
PQclear(res);
874879
res=PQgetResult(conn);
875880
}
876881
still_sending= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp