Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 63408
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: rweikusat [...] mssgmbh.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 2.18.0



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;
Thank you. Applied in r14555. Should be in 2.17.3