fix coredump

This commit is contained in:
Hongze Cheng 2022-05-17 13:11:39 +00:00
parent 88f0a0b3b2
commit ed25681fc8
1 changed files with 1 additions and 3 deletions

View File

@ -330,11 +330,9 @@ static int tdbPCacheOpenImpl(SPCache *pCache) {
} }
static int tdbPCacheCloseImpl(SPCache *pCache) { static int tdbPCacheCloseImpl(SPCache *pCache) {
SPage *pPage;
for (i32 iPage = 0; iPage < pCache->nPages; iPage++) { for (i32 iPage = 0; iPage < pCache->nPages; iPage++) {
if (pCache->aPage[iPage]) { if (pCache->aPage[iPage]) {
tdbPageDestroy(pPage, tdbDefaultFree, NULL); tdbPageDestroy(pCache->aPage[iPage], tdbDefaultFree, NULL);
pCache->aPage[iPage] = NULL; pCache->aPage[iPage] = NULL;
} }
} }