From ff292f2243615f96dc7fd4a71dbf463fc5008851 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 3 Jun 2020 04:03:28 +0000 Subject: [PATCH] TD-90 --- src/mnode/src/mnodeTable.c | 2 +- src/vnode/src/vnodeWrite.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index c37dd8d382..edb9585cb9 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -1408,7 +1408,7 @@ static void *mnodeBuildCreateChildTableMsg(SCMCreateTableMsg *pMsg, SChildTableO pSchema++; } - if (pTable->info.type == TSDB_CHILD_TABLE && pTagData != NULL) { + if (pTable->info.type == TSDB_CHILD_TABLE && pMsg != NULL) { memcpy(pCreate->data + totalCols * sizeof(SSchema), pTagData->data, tagDataLen); } diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index a605d20cac..4dfe492932 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -112,7 +112,6 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe int32_t code = tsdbCreateTable(pVnode->tsdb, pCfg); tsdbClearTableCfg(pCfg); - free(pCfg); return code; } @@ -136,7 +135,6 @@ static int32_t vnodeProcessAlterTableMsg(SVnodeObj *pVnode, void *pCont, SRspRet if (pCfg == NULL) return terrno; int32_t code = tsdbAlterTable(pVnode->tsdb, pCfg); tsdbClearTableCfg(pCfg); - free(pCfg); return code; } -- GitLab