From 77503a7638a35eedd9cb08d9ca4c54deb203521d Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Mon, 19 Mar 2012 17:52:20 -0300
Subject: [PATCH] pg_dump: fix double free of query results

This bug was introduced while refactoring in commit 1631598e --- no need
to back-patch.

Bug report and fix from Joachim Wieland.
---
 src/bin/pg_dump/pg_dump.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 2b0a5ff81ad..57a6ccb56f3 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -2372,8 +2372,6 @@ dumpBlobs(Archive *fout, void *arg)
 		PQclear(res);
 	} while (ntups > 0);
 
-	PQclear(res);
-
 	return 1;
 }
 
-- 
GitLab