-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:
Marcus Boerger 2002-12-20 17:47:58 +00:00
parent 710e49a30b
commit efd314e767
11 changed files with 65 additions and 51 deletions

View file

@ -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)