diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-21 07:58:11 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-21 08:31:16 +0200 |
commit | 11d95c64b33c4850567d44b5bbaeaa74eeff1525 (patch) | |
tree | 77a66d9bfb9eff720fc283b8dc94b14a0695867e /ext/GDBM_File | |
parent | a3ccc6f96faf75718ef71a5bfdce27781e7ae31a (diff) | |
download | perl-11d95c64b33c4850567d44b5bbaeaa74eeff1525.tar.gz |
[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.
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r-- | ext/GDBM_File/GDBM_File.xs | 8 |
1 files changed, 8 insertions, 0 deletions
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) |