dbLock: fix dbLockCleanupRecords

all lockRecord s allocated in one block.  oops.
This commit is contained in:
Michael Davidsaver
2014-07-11 16:27:41 -04:00
parent 3f11fd1665
commit a218bfd75c

View File

@@ -392,16 +392,18 @@ void dbLockInitRecords(dbBase *pdbbase)
void dbLockCleanupRecords(dbBase *pdbbase)
{
DBENTRY ent;
dbCommon *prec;
long status;
dbInitEntry(pdbbase, &ent);
for(status=dbFirstRecordType(&ent); !status; status=dbNextRecordType(&ent)) {
for(status=dbFirstRecord(&ent); !status; status=dbNextRecord(&ent)) {
dbCommon *prec = ent.precnode->precord;
free(prec->lset);
}
}
status=dbFirstRecordType(&ent);
if(status)
return;
status=dbNextRecordType(&ent);
if(status)
return;
prec = ent.precnode->precord;
free(prec->lset);
dbFinishEntry(&ent);
}