From 11d95c64b33c4850567d44b5bbaeaa74eeff1525 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 21 Oct 2010 07:58:11 +0200 Subject: [GNO]DBM_File must free any filter CVs in DESTROY. They have been leaking these since DBM filters were first added in 1999 by 9fe6733ac5627edd. DB_File and SDBM_File have always correctly freed their filters. --- ext/GDBM_File/GDBM_File.xs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/GDBM_File') diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs index d1f99e2d9e..b418b2537b 100644 --- a/ext/GDBM_File/GDBM_File.xs +++ b/ext/GDBM_File/GDBM_File.xs @@ -94,6 +94,14 @@ gdbm_DESTROY(db) GDBM_File db CODE: gdbm_close(db); + if (db->filter_fetch_key) + SvREFCNT_dec(db->filter_fetch_key) ; + if (db->filter_store_key) + SvREFCNT_dec(db->filter_store_key) ; + if (db->filter_fetch_value) + SvREFCNT_dec(db->filter_fetch_value) ; + if (db->filter_store_value) + SvREFCNT_dec(db->filter_store_value) ; safefree(db); #define gdbm_FETCH(db,key) gdbm_fetch(db->dbp,key) -- cgit v1.2.1