summaryrefslogtreecommitdiff
path: root/ext/dba/dba_flatfile.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_flatfile.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_flatfile.c')
-rw-r--r--ext/dba/dba_flatfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c
index a22866c456..53a577ab57 100644
--- a/ext/dba/dba_flatfile.c
+++ b/ext/dba/dba_flatfile.c
@@ -41,7 +41,7 @@
DBA_OPEN_FUNC(flatfile)
{
- info->dbf = emalloc(sizeof(flatfile));
+ info->dbf = pemalloc(sizeof(flatfile), info->flags&DBA_PERSISTENT);
memset(info->dbf, 0, sizeof(flatfile));
((flatfile*)info->dbf)->fp = info->fp;
@@ -55,7 +55,7 @@ DBA_CLOSE_FUNC(flatfile)
if (dba->nextkey.dptr)
efree(dba->nextkey.dptr);
- efree(dba);
+ pefree(dba, info->flags&DBA_PERSISTENT);
}
DBA_FETCH_FUNC(flatfile)