From 9d2421922973d27ecd375cb50d198fa089ca9421 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Tue, 12 Jan 2021 17:00:06 +0800 Subject: [PATCH] fix bug --- src/client/src/tscSystem.c | 2 ++ src/client/src/tscUtil.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 3f623059bd..08b8c4d74f 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -84,6 +84,8 @@ int32_t tscInitRpc(const char *user, const char *secretEncrypt, void **pDnodeCon void taos_init_imp(void) { char temp[128] = {0}; + tdminit(); + errno = TSDB_CODE_SUCCESS; srand(taosGetTimestampSec()); deltaToUtcInitOnce(); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 85401f826e..fb64d0bc50 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -503,6 +503,8 @@ void tscFreeSqlObj(SSqlObj* pSql) { pCmd->allocSize = 0; tsem_destroy(&pSql->rspSem); + + memset(pSql, 0, sizeof(*pSql)); TDMFREE(pSql); } -- GitLab