mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
-Fix memory handling of persistent dba connections.
-Update tests. # cdb and flatfile still FAIL for dba_popen since the known streams problem
This commit is contained in:
parent
710e49a30b
commit
efd314e767
11 changed files with 65 additions and 51 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue