fix invalid free

This commit is contained in:
Yihao Deng 2024-05-15 16:56:02 +08:00
parent 01e9ae6299
commit f33bf898b4
1 changed files with 4 additions and 2 deletions

View File

@ -2740,9 +2740,11 @@ int32_t streamStateGetGroupKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey,
if (pKey->groupId == groupId) {
return 0;
}
if (pVal != NULL) taosMemoryFree((void*)*pVal);
if (pVal != NULL) {
taosMemoryFree((void*)*pVal);
*pVal = NULL;
}
}
return -1;
}
int32_t streamStateAddIfNotExist_rocksdb(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen) {