From ec78ff7120f1b7b318c4992f5b53b0dd7eb65d16 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 16 Nov 2021 23:26:56 +0800 Subject: [PATCH] fix windows compilation error --- src/client/src/tscSQLParser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index cf2e216fef..b33faa7d4f 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6071,18 +6071,18 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { bool dbIncluded = false; SStrToken tmpToken = pAlterSQL->name; - char *tmpTokenBuf = strndup(pAlterSQL->name.z, pAlterSQL->name.n); - tmpToken.z = tmpTokenBuf; + tmpToken.z= strndup(pAlterSQL->name.z, pAlterSQL->name.n); if (tscValidateName(&tmpToken, true, &dbIncluded) != TSDB_CODE_SUCCESS) { - free(tmpTokenBuf); + free(tmpToken.z); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } - free(tmpTokenBuf); code = tscSetTableFullName(&pTableMetaInfo->name, &tmpToken, pSql, dbIncluded); if (code != TSDB_CODE_SUCCESS) { + free(tmpToken.z); return code; } + free(tmpToken.z); code = tscGetTableMeta(pSql, pTableMetaInfo); if (code != TSDB_CODE_SUCCESS) { -- GitLab