提交 4ccac92d 编写于 作者: F Fujii Masao

Fix double-free bug of WAL streaming buffer in pg_receivexlog.

This bug was introduced while refactoring in commit 74cbe966.
上级 74cbe966
......@@ -1079,12 +1079,11 @@ CopyStreamPoll(PGconn *conn, long timeout_ms)
static int
CopyStreamReceive(PGconn *conn, long timeout, char **buffer)
{
static char *copybuf = NULL;
char *copybuf = NULL;
int rawlen;
if (copybuf != NULL)
PQfreemem(copybuf);
copybuf = NULL;
if (*buffer != NULL)
PQfreemem(*buffer);
*buffer = NULL;
/* Try to receive a CopyData message */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册