Merge pull request #28238 from taosdata/fix/3.0/TD-32452

fix:[TD-32452] Clean up when error occurs to avoid mem leak.
This commit is contained in:
Pan Wei 2024-10-09 09:49:40 +08:00 committed by GitHub
commit 6c68777fee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -3185,7 +3185,8 @@ int32_t firstLastPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
} else {
code = colDataSetVal(pCol, pBlock->info.rows, res, false);
if (TSDB_CODE_SUCCESS != code) {
return TSDB_CODE_OUT_OF_MEMORY;
taosMemoryFree(res);
return code;
}
code = setSelectivityValue(pCtx, pBlock, &pRes->pos, pBlock->info.rows);
}