summaryrefslogtreecommitdiff
path: root/ext/dba/dba_gdbm.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-12-20 17:47:58 +0000
committerMarcus Boerger <helly@php.net>2002-12-20 17:47:58 +0000
commitefd314e7676ee15fce07e282b0655b539eb1f5cc (patch)
treebaf9c56a1a400886fbe21aefd0141be4df682b99 /ext/dba/dba_gdbm.c
parent710e49a30b67ca589f49a0db64b0fad08634a2e5 (diff)
downloadphp-git-efd314e7676ee15fce07e282b0655b539eb1f5cc.tar.gz
-Fix memory handling of persistent dba connections.
-Update tests. # cdb and flatfile still FAIL for dba_popen since the known streams problem
Diffstat (limited to 'ext/dba/dba_gdbm.c')
-rw-r--r--ext/dba/dba_gdbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 18288ace27..93c53d4b94 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -59,7 +59,7 @@ DBA_OPEN_FUNC(gdbm)
dbf = gdbm_open(info->path, 0, gmode, filemode, NULL);
if(dbf) {
- info->dbf = emalloc(sizeof(dba_gdbm_data));
+ info->dbf = pemalloc(sizeof(dba_gdbm_data), info->flags&DBA_PERSISTENT);
memset(info->dbf, 0, sizeof(dba_gdbm_data));
((dba_gdbm_data *) info->dbf)->dbf = dbf;
return SUCCESS;
@@ -74,7 +74,7 @@ DBA_CLOSE_FUNC(gdbm)
if(dba->nextkey.dptr) free(dba->nextkey.dptr);
gdbm_close(dba->dbf);
- efree(dba);
+ pefree(dba, info->flags&DBA_PERSISTENT);
}
DBA_FETCH_FUNC(gdbm)