Merge pull request #28192 from taosdata/fix/3.0/TD-32419
fix:[TD-32419] Free memory allocated in sclWalkCaseWhenList.
This commit is contained in:
commit
9c0dd9c413
|
@ -628,8 +628,8 @@ int32_t sclWalkCaseWhenList(SScalarCtx *ctx, SNodeList *pList, struct SListCell
|
||||||
cell = cell->pNext) {
|
cell = cell->pNext) {
|
||||||
pWhenThen = (SWhenThenNode *)node;
|
pWhenThen = (SWhenThenNode *)node;
|
||||||
|
|
||||||
SCL_ERR_RET(sclGetNodeRes(pWhenThen->pWhen, ctx, &pWhen));
|
SCL_ERR_JRET(sclGetNodeRes(pWhenThen->pWhen, ctx, &pWhen));
|
||||||
SCL_ERR_RET(sclGetNodeRes(pWhenThen->pThen, ctx, &pThen));
|
SCL_ERR_JRET(sclGetNodeRes(pWhenThen->pThen, ctx, &pThen));
|
||||||
|
|
||||||
SCL_ERR_JRET(vectorCompareImpl(pCase, pWhen, pComp, rowIdx, 1, TSDB_ORDER_ASC, OP_TYPE_EQUAL));
|
SCL_ERR_JRET(vectorCompareImpl(pCase, pWhen, pComp, rowIdx, 1, TSDB_ORDER_ASC, OP_TYPE_EQUAL));
|
||||||
|
|
||||||
|
@ -646,6 +646,10 @@ int32_t sclWalkCaseWhenList(SScalarCtx *ctx, SNodeList *pList, struct SListCell
|
||||||
|
|
||||||
goto _return;
|
goto _return;
|
||||||
}
|
}
|
||||||
|
sclFreeParam(pWhen);
|
||||||
|
sclFreeParam(pThen);
|
||||||
|
taosMemoryFreeClear(pWhen);
|
||||||
|
taosMemoryFreeClear(pThen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pElse) {
|
if (pElse) {
|
||||||
|
@ -672,8 +676,8 @@ _return:
|
||||||
|
|
||||||
sclFreeParam(pWhen);
|
sclFreeParam(pWhen);
|
||||||
sclFreeParam(pThen);
|
sclFreeParam(pThen);
|
||||||
taosMemoryFree(pWhen);
|
taosMemoryFreeClear(pWhen);
|
||||||
taosMemoryFree(pThen);
|
taosMemoryFreeClear(pThen);
|
||||||
|
|
||||||
SCL_RET(code);
|
SCL_RET(code);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue