fix:[TD-32727] set SArray pointer to NULL after destroy.

This commit is contained in:
Jing Sima 2024-11-01 09:11:35 +08:00
parent 412c20968e
commit 135adabd98
1 changed files with 2 additions and 0 deletions

View File

@ -675,11 +675,13 @@ static int32_t initGroupKeyKeeper(STimeSliceOperatorInfo* pInfo, SExprSupp* pExp
.pData = taosMemoryCalloc(1, pExprInfo->base.resSchema.bytes)};
if (!key.pData) {
taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey);
pInfo->pPrevGroupKeys = NULL;
return terrno;
}
if (NULL == taosArrayPush(pInfo->pPrevGroupKeys, &key)) {
taosMemoryFree(key.pData);
taosArrayDestroyEx(pInfo->pPrevGroupKeys, destroyGroupKey);
pInfo->pPrevGroupKeys = NULL;
return terrno;
}
}