Merge pull request #25798 from taosdata/fix/backendInvalidFree

Fix/backendInvalidFree
This commit is contained in:
wade zhang 2024-05-17 13:46:18 +08:00 committed by GitHub
commit b299ff0449
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

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