Subject: | memory leak in pg_db_cancel |
Apparently similar in spirit to the handle_old_async routine, the code
in pg_db_cancel also obtains a pointer to a PGresult and never frees it.
Subject: | patch2.txt |
Index: DBD-Pg/dbdimp.c
===================================================================
RCS file: /sysdata/cvs/DBD-Pg/dbdimp.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.4.6.2
diff -u -r1.1.1.4 -r1.1.1.4.6.2
--- DBD-Pg/dbdimp.c 24 Nov 2010 18:00:35 -0000 1.1.1.4
+++ DBD-Pg/dbdimp.c 29 Nov 2010 14:55:02 -0000 1.1.1.4.6.2
@@ -4781,6 +4781,9 @@
status = _sqlstate(aTHX_ imp_dbh, result);
+ TRACE_PQCLEAR;
+ PQclear(result);
+
/* If we actually cancelled a running query, just return true - the caller must rollback if needed */
if (0 == strncmp(imp_dbh->sqlstate, "57014", 5)) {
if (TEND) TRC(DBILOGFP, "%sEnd pg_db_cancel\n", THEADER);