diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 12f72ba43f50f61de61cae0e655064ac9d7808a2..9b519c7e4e4a1aff20d2527a4162179c9540d787 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1886,7 +1886,6 @@ static int32_t handleAggregateExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_ pSqlExpr->param[0].nType = TSDB_DATA_TYPE_BINARY; // tbufCloseWriter(&bw); // TODO there is a memory leak - tExprTreeDestroy(pInfo->pExpr->pExpr, NULL); return TSDB_CODE_SUCCESS; } diff --git a/src/common/inc/texpr.h b/src/common/inc/texpr.h index 29e7df6a297fddd1729550a83ac8491ba2c45e8a..4aaff98b17e362c61699d86ad4fad33d636475f1 100644 --- a/src/common/inc/texpr.h +++ b/src/common/inc/texpr.h @@ -115,7 +115,7 @@ typedef struct tExprNode { struct { int16_t functionId; uint8_t numChildren; - struct tExprNode** pChildren; + struct tExprNode **pChildren; } _func; }; int16_t resultType; diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index 37244e208a8fbd2e3f52e7b05a1d62a86c909212..2176784aa3d61a4858e6b0f926cf58d9235c0cdc 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -956,6 +956,8 @@ tExprNode* exprdup(tExprNode* pNode) { } pCloned->nodeType = pNode->nodeType; + pCloned->resultType = pNode->resultType; + pCloned->resultBytes = pNode->resultBytes; return pCloned; }