[TD-5633]<fix>:fix memory leak of intermediate result buf
This commit is contained in:
parent
babde623be
commit
f385b19002
|
@ -4132,6 +4132,11 @@ void blockinfo_func_finalizer(SQLFunctionCtx* pCtx) {
|
||||||
pDist->rowSize = (uint16_t)pCtx->param[0].i64;
|
pDist->rowSize = (uint16_t)pCtx->param[0].i64;
|
||||||
generateBlockDistResult(pDist, pCtx->pOutput);
|
generateBlockDistResult(pDist, pCtx->pOutput);
|
||||||
|
|
||||||
|
if (pDist->dataBlockInfos != NULL) {
|
||||||
|
taosArrayDestroy(pDist->dataBlockInfos);
|
||||||
|
pDist->dataBlockInfos = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// cannot set the numOfIteratedElems again since it is set during previous iteration
|
// cannot set the numOfIteratedElems again since it is set during previous iteration
|
||||||
pResInfo->numOfRes = 1;
|
pResInfo->numOfRes = 1;
|
||||||
pResInfo->hasResult = DATA_SET_FLAG;
|
pResInfo->hasResult = DATA_SET_FLAG;
|
||||||
|
|
Loading…
Reference in New Issue