fix:[TD-32452] Clean up when error occurs to avoid mem leak.
This commit is contained in:
parent
b7d7a23eea
commit
83f0601ea9
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue