Merge pull request #23555 from taosdata/fix/ly_test

release row buff pos
This commit is contained in:
Haojun Liao 2023-11-07 09:12:16 +08:00 committed by GitHub
commit 8fa4acd685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -373,8 +373,11 @@ void clearGroupResInfo(SGroupResInfo* pGroupResInfo) {
if (pGroupResInfo->freeItem) { if (pGroupResInfo->freeItem) {
int32_t size = taosArrayGetSize(pGroupResInfo->pRows); int32_t size = taosArrayGetSize(pGroupResInfo->pRows);
for (int32_t i = pGroupResInfo->index; i < size; i++) { for (int32_t i = pGroupResInfo->index; i < size; i++) {
void* pVal = taosArrayGetP(pGroupResInfo->pRows, i); SRowBuffPos* pPos = taosArrayGetP(pGroupResInfo->pRows, i);
taosMemoryFree(pVal); if (!pPos->needFree && !pPos->pRowBuff) {
taosMemoryFreeClear(pPos->pKey);
taosMemoryFree(pPos);
}
} }
pGroupResInfo->freeItem = false; pGroupResInfo->freeItem = false;
} }