diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 3589558d649fd8742d8bc7fff5c4ae4d51b9845b..480421b5c014fae2b71bfd93ee3e4fd683b408dd 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -788,6 +788,9 @@ int writeVarNames(int type, TAOS_RES* tres) { void setThreadNull(int type) { taosThreadMutexLock(&tiresMutex); + if(threads[type]) { + taosMemoryFree(threads[type]); + } threads[type] = NULL; taosThreadMutexUnlock(&tiresMutex); }