summaryrefslogtreecommitdiff
path: root/ext/dba/dba_gdbm.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-11-04 13:39:17 +0000
committerMarcus Boerger <helly@php.net>2002-11-04 13:39:17 +0000
commit02c903b25e2b4e9a0a1c54a2cbdb0ea020d1ea2f (patch)
tree5c2a4f718714be56bb2baad65c4b2b57dd8803f6 /ext/dba/dba_gdbm.c
parent3f7081c4390e4d62507c7a2e962f11efb1dfe257 (diff)
downloadphp-git-02c903b25e2b4e9a0a1c54a2cbdb0ea020d1ea2f.tar.gz
use ecmalloc/efree functions instead of (c|m)alloc/free
Diffstat (limited to 'ext/dba/dba_gdbm.c')
-rw-r--r--ext/dba/dba_gdbm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 66a6bce709..e462d01b95 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -59,8 +59,7 @@ DBA_OPEN_FUNC(gdbm)
dbf = gdbm_open(info->path, 0, gmode, filemode, NULL);
if(dbf) {
- info->dbf = malloc(sizeof(dba_gdbm_data));
- memset(info->dbf, 0, sizeof(dba_gdbm_data));
+ info->dbf = ecalloc(sizeof(dba_gdbm_data), 1);
((dba_gdbm_data *) info->dbf)->dbf = dbf;
return SUCCESS;
}
@@ -73,7 +72,7 @@ DBA_CLOSE_FUNC(gdbm)
if(dba->nextkey.dptr) free(dba->nextkey.dptr);
gdbm_close(dba->dbf);
- free(dba);
+ efree(dba);
}
DBA_FETCH_FUNC(gdbm)