Subject: | memory leak in handle_old_async/ DBD::Pg 2.17.2 |
The PG_OLDQUERY_CANCEL path in handle_old_async calls PQgetResult
in a loop in order to 'Suck up the cancellation notice' (comment)
but doesn't free the results possibly obtained in this way. Attached
is a patch which fixes this.
Subject: | patch.txt |
--- DBD-Pg/dbdimp.c 24 Nov 2010 18:00:35 -0000 1.1.1.4
+++ DBD-Pg/dbdimp.c 28 Nov 2010 19:23:53 -0000 1.1.1.4.2.1
@@ -4858,6 +4858,8 @@
/* Suck up the cancellation notice */
TRACE_PQGETRESULT;
while ((result = PQgetResult(imp_dbh->conn)) != NULL) {
+ TRACE_PQCLEAR;
+ PQclear(result);
}
/* We need to rollback! - reprepare!? */
TRACE_PQEXEC;