diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index c37dd8d3825a96c02ca36bc35654e509db6f7945..edb9585cb9d3ddba7ce08c19fb0d9fbe5cef0d81 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 a605d20cac203943ed6a30ad1d556ef3d1053599..4dfe492932326a34dc3062bebe4c2a7ca1e66d94 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; }