未验证 提交 0878c239 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #5107 from taosdata/hotfix/TD-2904

fix mem leak
...@@ -908,6 +908,7 @@ int main(int argc, char *argv[]) { ...@@ -908,6 +908,7 @@ int main(int argc, char *argv[]) {
} }
pthread_join(read_id, NULL); pthread_join(read_id, NULL);
taos_close(rInfo->taos); taos_close(rInfo->taos);
free(rInfo);
} }
taos_cleanup(); taos_cleanup();
......
...@@ -279,7 +279,7 @@ tSQLExpr *tSqlExprCreate(tSQLExpr *pLeft, tSQLExpr *pRight, int32_t optrType) { ...@@ -279,7 +279,7 @@ tSQLExpr *tSqlExprCreate(tSQLExpr *pLeft, tSQLExpr *pRight, int32_t optrType) {
pExpr->nSQLOptr = optrType; pExpr->nSQLOptr = optrType;
pExpr->pLeft = pLeft; pExpr->pLeft = pLeft;
if (pRight == NULL) { if (pLeft != NULL && pRight == NULL) {
pRight = calloc(1, sizeof(tSQLExpr)); pRight = calloc(1, sizeof(tSQLExpr));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册