Free leaked result set in pg_rewind
authorHeikki Linnakangas <[email protected]>
Sun, 12 Apr 2015 19:42:01 +0000 (22:42 +0300)
committerHeikki Linnakangas <[email protected]>
Sun, 12 Apr 2015 19:42:01 +0000 (22:42 +0300)
It was not significant in practice, it was just one instance of a small
result set, but let's pacify Coverity.

Michael Paquier

src/bin/pg_rewind/libpq_fetch.c

index 23c971ab1c2ca7524355d7329594bd5b9c5bbea8..e696554a92b009841192ba8273c15f62af593f9b 100644 (file)
@@ -231,6 +231,7 @@ receiveFileChunks(const char *sql)
                                break;
 
                        case PGRES_TUPLES_OK:
+                               PQclear(res);
                                continue;               /* final zero-row result */
 
                        default: