From: Gurusamy Sarathy Date: Tue, 15 Feb 2000 05:17:56 +0000 (+0000) Subject: fix leaks in *DBM_File; safemalloc()ed things need to be freed with X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb99164fe573f928a1e23c686cddfafdbe9ae10a;p=p5sagit%2Fp5-mst-13.2.git fix leaks in *DBM_File; safemalloc()ed things need to be freed with safefree() rather than Safefree() p4raw-id: //depot/perl@5091 --- diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 7bc2491..2b76bab 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -1586,7 +1586,7 @@ db_DESTROY(db) if (db->filter_store_value) SvREFCNT_dec(db->filter_store_value) ; #endif /* DBM_FILTERING */ - Safefree(db) ; + safefree(db) ; #ifdef DB_VERSION_MAJOR if (RETVAL > 0) RETVAL = -1 ; diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs index be1817b..870f056 100644 --- a/ext/GDBM_File/GDBM_File.xs +++ b/ext/GDBM_File/GDBM_File.xs @@ -236,6 +236,7 @@ gdbm_DESTROY(db) GDBM_File db CODE: gdbm_close(db); + safefree(db); #define gdbm_FETCH(db,key) gdbm_fetch(db->dbp,key) datum_value diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs index 29cc288..49a1db5 100644 --- a/ext/NDBM_File/NDBM_File.xs +++ b/ext/NDBM_File/NDBM_File.xs @@ -63,6 +63,7 @@ ndbm_DESTROY(db) NDBM_File db CODE: dbm_close(db->dbp); + safefree(db); #define ndbm_FETCH(db,key) dbm_fetch(db->dbp,key) datum_value diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index 7601c34..e263dfb 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -120,6 +120,7 @@ DESTROY(db) CODE: dbmrefcnt--; dbmclose(); + safefree(db); datum_value odbm_FETCH(db, key) diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs index ee672ca..a4b9045 100644 --- a/ext/SDBM_File/SDBM_File.xs +++ b/ext/SDBM_File/SDBM_File.xs @@ -80,7 +80,7 @@ sdbm_DESTROY(db) SvREFCNT_dec(db->filter_fetch_value) ; if (db->filter_store_value) SvREFCNT_dec(db->filter_store_value) ; - Safefree(db) ; + safefree(db) ; datum_value sdbm_FETCH(db, key)