Skip Menu |

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

Report information
The Basics
Id: 63441
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 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);
Thanks! Applied in r14553, should be a part of 2.17.3