diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-15 05:17:56 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-15 05:17:56 +0000 |
commit | eb99164fe573f928a1e23c686cddfafdbe9ae10a (patch) | |
tree | eae8bb5b4209240a71a8c3f8e94c84498fcfb101 | |
parent | 850fabdf2ccd0a80b987899ff0014695459be38a (diff) | |
download | perl-eb99164fe573f928a1e23c686cddfafdbe9ae10a.tar.gz |
fix leaks in *DBM_File; safemalloc()ed things need to be freed with
safefree() rather than Safefree()
p4raw-id: //depot/perl@5091
-rw-r--r-- | ext/DB_File/DB_File.xs | 2 | ||||
-rw-r--r-- | ext/GDBM_File/GDBM_File.xs | 1 | ||||
-rw-r--r-- | ext/NDBM_File/NDBM_File.xs | 1 | ||||
-rw-r--r-- | ext/ODBM_File/ODBM_File.xs | 1 | ||||
-rw-r--r-- | ext/SDBM_File/SDBM_File.xs | 2 |
5 files changed, 5 insertions, 2 deletions
diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 7bc2491cb4..2b76bab722 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 be1817bba2..870f056c9b 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 29cc288769..49a1db5e56 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 7601c3433b..e263dfbc62 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 ee672ca915..a4b90451a9 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) |