fix/tdb: remove UAF preped

This commit is contained in:
Minglei Jin 2022-11-29 10:46:04 +08:00
parent e090cd9dd9
commit 7902b7aaac
2 changed files with 1 additions and 3 deletions

View File

@ -89,7 +89,6 @@ struct STxn {
void *xArg;
tdb_fd_t jfd;
hashset_t jPageSet;
int preped;
};
// error code

View File

@ -297,7 +297,7 @@ int tdbPagerBegin(SPager *pPager, TXN *pTxn) {
}
pTxn->jPageSet = hashset_create();
ASSERT(pPager->pActiveTxn->preped == 1);
pPager->pActiveTxn = pTxn;
// TODO: write the size of the file
/*
@ -433,7 +433,6 @@ int tdbPagerPrepareAsyncCommit(SPager *pPager, TXN *pTxn) {
tdbPCacheRelease(pPager->pCache, pPage, pTxn);
}
pTxn->preped = 1;
/*
tdbTrace("reset dirty tree: %p", &pPager->rbt);
tRBTreeCreate(&pPager->rbt, pageCmpFn);