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,8 +2740,10 @@ int32_t streamStateGetGroupKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey,
if (pKey->groupId == groupId) {
return 0;
}
if (pVal != NULL) taosMemoryFree((void*)*pVal);
*pVal = NULL;
if (pVal != NULL) {
taosMemoryFree((void*)*pVal);
*pVal = NULL;
}
}
return -1;
}