avoid invalid free

This commit is contained in:
yihaoDeng 2022-12-29 14:12:09 +08:00
parent 1f9786886b
commit b2f306e09d
1 changed files with 1 additions and 2 deletions

View File

@ -178,7 +178,7 @@ static int32_t dmInitLog() {
} }
static void taosCleanupArgs() { static void taosCleanupArgs() {
if (global.envCmd != NULL) taosMemoryFree(global.envCmd); if (global.envCmd != NULL) taosMemoryFreeClear(global.envCmd);
} }
int main(int argc, char const *argv[]) { int main(int argc, char const *argv[]) {
@ -271,7 +271,6 @@ int mainWindows(int argc, char **argv) {
taosCleanupCfg(); taosCleanupCfg();
taosCloseLog(); taosCloseLog();
taosCleanupArgs();
taosConvDestroy(); taosConvDestroy();
return -1; return -1;
} }