Merge pull request #11889 from taosdata/fix/ZhiqiangWang/fix-15146-memory-free-error

fix(shell): memory free error.
This commit is contained in:
Zhiqiang Wang 2022-04-26 16:57:13 +08:00 committed by GitHub
commit 6dffa66031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ static void dmSetSignalHandle() {
static int32_t dmParseArgs(int32_t argc, char const *argv[]) {
int32_t cmdEnvIndex = 0;
if (argc < 2) return 0;
global.envCmd = taosMemoryMalloc(argc-1);
memset(global.envCmd, 0, argc-1);
for (int32_t i = 1; i < argc; ++i) {