diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-10-20 21:08:37 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-10-21 11:34:28 +0200 |
commit | a5c6857cbad41a80aba26d560558a58cbba0505f (patch) | |
tree | 3e9da72b95e329f6a8aae589d9222e6911fb4598 /ext/GDBM_File | |
parent | 76cc365d064e9bf5a0e771bb8ae2bf380b8b0d25 (diff) | |
download | perl-a5c6857cbad41a80aba26d560558a58cbba0505f.tar.gz |
Convert [GNOS]DBM_File::TIEHASH to safecalloc() from safemalloc() then Zero().
Diffstat (limited to 'ext/GDBM_File')
-rw-r--r-- | ext/GDBM_File/GDBM_File.xs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs index b418b2537b..ef951bdd25 100644 --- a/ext/GDBM_File/GDBM_File.xs +++ b/ext/GDBM_File/GDBM_File.xs @@ -73,8 +73,7 @@ gdbm_TIEHASH(dbtype, name, read_write, mode, fatal_func = (FATALFUNC)croak) RETVAL = NULL ; if ((dbp = gdbm_open(name, GDBM_BLOCKSIZE, read_write, mode, fatal_func))) { - RETVAL = (GDBM_File)safemalloc(sizeof(GDBM_File_type)) ; - Zero(RETVAL, 1, GDBM_File_type) ; + RETVAL = (GDBM_File)safecalloc(1, sizeof(GDBM_File_type)) ; RETVAL->dbp = dbp ; } |