提交 747db68a 编写于 作者: H Haojun Liao

[td-225]fix memory leak

上级 c4f03061
......@@ -566,7 +566,6 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) {
break;
}
tscClearSubqueryInfo(&pNew->cmd);
pSql->pSubs[i] = pNew;
......@@ -1878,6 +1877,7 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
pNewQueryInfo->limit.limit = -1;
pNewQueryInfo->limit.offset = 0;
taosArrayDestroy(pNewQueryInfo->pUpstream);
pNewQueryInfo->order.orderColId = INT32_MIN;
......
......@@ -6447,6 +6447,7 @@ int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExp
return TSDB_CODE_SUCCESS;
}
// todo refactor
int32_t createIndirectQueryFuncExprFromMsg(SQueryTableMsg* pQueryMsg, int32_t numOfOutput, SExprInfo** pExprInfo,
SSqlExpr** pExpr, SExprInfo* prevExpr) {
*pExprInfo = NULL;
......@@ -6461,6 +6462,12 @@ int32_t createIndirectQueryFuncExprFromMsg(SQueryTableMsg* pQueryMsg, int32_t nu
for (int32_t i = 0; i < numOfOutput; ++i) {
pExprs[i].base = *pExpr[i];
memset(pExprs[i].base.param, 0, sizeof(tVariant) * tListLen(pExprs[i].base.param));
for (int32_t j = 0; j < pExpr[i]->numOfParams; ++j) {
tVariantAssign(&pExprs[i].base.param[j], &pExpr[i]->param[j]);
}
pExprs[i].base.resType = 0;
int16_t type = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册