diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c index 23c971ab1c..e696554a92 100644 --- a/src/bin/pg_rewind/libpq_fetch.c +++ b/src/bin/pg_rewind/libpq_fetch.c @@ -231,6 +231,7 @@ receiveFileChunks(const char *sql) break; case PGRES_TUPLES_OK: + PQclear(res); continue; /* final zero-row result */ default: