diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 8eed02bbbe..f98b195039 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -865,12 +865,15 @@ STableCfg* tableCfgDup(STableCfg* pCfg) { STableCfg* pNew = taosMemoryMalloc(sizeof(*pNew)); memcpy(pNew, pCfg, sizeof(*pNew)); - if (pNew->pComment) { + if (NULL != pNew->pComment) { pNew->pComment = strdup(pNew->pComment); } - if (pNew->pFuncs) { + if (NULL != pNew->pFuncs) { pNew->pFuncs = taosArrayDup(pNew->pFuncs); } + if (NULL != pNew->pTags) { + pNew->pTags = strdup(pNew->pTags); + } int32_t schemaSize = (pCfg->numOfColumns + pCfg->numOfTags) * sizeof(SSchema);