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

Commit4ccac92

Browse files
committed
Fix double-free bug of WAL streaming buffer in pg_receivexlog.
This bug was introduced while refactoring in commit74cbe96.
1 parent74cbe96 commit4ccac92

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/bin/pg_basebackup/receivelog.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,12 +1079,11 @@ CopyStreamPoll(PGconn *conn, long timeout_ms)
10791079
staticint
10801080
CopyStreamReceive(PGconn*conn,longtimeout,char**buffer)
10811081
{
1082-
staticchar*copybuf=NULL;
1082+
char*copybuf=NULL;
10831083
intrawlen;
10841084

1085-
if (copybuf!=NULL)
1086-
PQfreemem(copybuf);
1087-
copybuf=NULL;
1085+
if (*buffer!=NULL)
1086+
PQfreemem(*buffer);
10881087
*buffer=NULL;
10891088

10901089
/* Try to receive a CopyData message */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp