From f0ab7dbc96b2d53462a40e5eaafd0016c366e33d Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 18 Apr 2022 20:29:10 +0800 Subject: [PATCH 1/2] fix: memory leak in tconfig.c in client --- source/client/src/clientMain.c | 1 + tools/shell/src/shellEngine.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 2e6cd4ce17..903018d5c3 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -71,6 +71,7 @@ void taos_cleanup(void) { schedulerDestroy(); tscInfo("all local resources released"); + taosCleanupCfg(); taosCloseLog(); } diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index ac2010efa3..548d2169b1 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -91,11 +91,6 @@ TAOS *shellInit(SShellArguments *_args) { _args->user = TSDB_DEFAULT_USER; } - SConfig *pCfg = cfgInit(); - if (NULL == pCfg) return NULL; - - if (0 != taosAddClientLogCfg(pCfg)) return NULL; - // Connect to the database. TAOS *con = NULL; if (_args->auth == NULL) { From 784563667682ee353e6363b53ae21241f683a506 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 18 Apr 2022 20:55:01 +0800 Subject: [PATCH 2/2] test: update data.sim to repeat valgrind error --- tests/script/tmp/data.sim | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index faac5b2828..92fc9dccc9 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -3,6 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect +return sql create database db sql create table db.tb (ts timestamp, i int) sql insert into db.tb values(now, 1)