pg_basebackup.patch
application/octet-stream
Filename: pg_basebackup.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/bin/pg_basebackup/streamutil.c | 2 | 0 |
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index 1b90057..57a1ff9 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -313,6 +313,7 @@ RetrieveWalSegSize(PGconn *conn)
if (sscanf(PQgetvalue(res, 0, 0), "%d%s", &xlog_val, xlog_unit) != 2)
{
pg_log_error("WAL segment size could not be parsed");
+ PQclear(res);
return false;
}
@@ -331,6 +332,7 @@ RetrieveWalSegSize(PGconn *conn)
"WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes",
WalSegSz),
WalSegSz);
+ PQclear(res);
return false;
}