summaryrefslogtreecommitdiff
path: root/ext/ODBM_File/ODBM_File.xs
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-21 07:58:11 +0200
committerNicholas Clark <nick@ccl4.org>2010-10-21 08:31:16 +0200
commit11d95c64b33c4850567d44b5bbaeaa74eeff1525 (patch)
tree77a66d9bfb9eff720fc283b8dc94b14a0695867e /ext/ODBM_File/ODBM_File.xs
parenta3ccc6f96faf75718ef71a5bfdce27781e7ae31a (diff)
downloadperl-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/ODBM_File/ODBM_File.xs')
-rw-r--r--ext/ODBM_File/ODBM_File.xs8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
index 2510d5e4f3..8faf4a92d6 100644
--- a/ext/ODBM_File/ODBM_File.xs
+++ b/ext/ODBM_File/ODBM_File.xs
@@ -122,6 +122,14 @@ DESTROY(db)
CODE:
dbmrefcnt--;
dbmclose();
+ 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);
datum_value