提交 ea6c96df 编写于 作者: G Ganlin Zhao

fix memory leak

上级 89e4b15d
......@@ -30,6 +30,7 @@ extern "C" {
struct SSDataBlock;
typedef struct SFillColInfo {
int32_t numOfFillExpr;
SExprInfo* pExpr;
bool notFillCol; // denote if this column needs fill operation
SVariant fillVal;
......
......@@ -635,6 +635,7 @@ SFillColInfo* createFillColInfo(SExprInfo* pExpr, int32_t numOfFillExpr, SExprIn
nodesValueNodeToVariant(pv, &pFillCol[i].fillVal);
}
}
pFillCol->numOfFillExpr = numOfFillExpr;
for (int32_t i = 0; i < numOfNoFillExpr; ++i) {
SExprInfo* pExprInfo = &pNotFillExpr[i];
......
......@@ -661,6 +661,9 @@ void destroyTimeSliceOperatorInfo(void* param) {
taosArrayDestroy(pInfo->pLinearInfo);
cleanupExprSupp(&pInfo->scalarSup);
for (int32_t i = 0; i < pInfo->pFillColInfo->numOfFillExpr; ++i) {
taosVariantDestroy(&pInfo->pFillColInfo[i].fillVal);
}
taosMemoryFree(pInfo->pFillColInfo);
taosMemoryFreeClear(param);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册