Merge pull request #22337 from taosdata/fix/fixInvalidFree

fix invalid free
This commit is contained in:
Haojun Liao 2023-08-07 11:45:29 +08:00 committed by GitHub
commit 7924d7e0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -218,11 +218,11 @@ _EXIT:
}
void streamBackendCleanup(void* arg) {
SBackendWrapper* pHandle = (SBackendWrapper*)arg;
RocksdbCfInst** pIter = (RocksdbCfInst**)taosHashIterate(pHandle->cfInst, NULL);
void* pIter = taosHashIterate(pHandle->cfInst, NULL);
while (pIter != NULL) {
RocksdbCfInst* inst = *pIter;
RocksdbCfInst* inst = *(RocksdbCfInst**)pIter;
destroyRocksdbCfInst(inst);
taosHashIterate(pHandle->cfInst, pIter);
pIter = taosHashIterate(pHandle->cfInst, pIter);
}
taosHashCleanup(pHandle->cfInst);