We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c834576 commit 329de9fCopy full SHA for 329de9f
src/bin/pg_basebackup/pg_recvlogical.c
@@ -547,9 +547,6 @@ StreamLog(void)
547
}
548
PQclear(res);
549
550
- if (copybuf != NULL)
551
- PQfreemem(copybuf);
552
-
553
if (outfd != -1 && strcmp(outfile, "-") != 0)
554
{
555
int64 t = feGetCurrentTimestamp();
@@ -563,6 +560,11 @@ StreamLog(void)
563
560
564
561
outfd = -1;
565
562
error:
+ if (copybuf != NULL)
+ {
+ PQfreemem(copybuf);
566
+ copybuf = NULL;
567
+ }
568
destroyPQExpBuffer(query);
569
PQfinish(conn);
570
conn = NULL;
0 commit comments