Prevent misconfiguration

This commit is contained in:
facetosea 2024-03-12 10:06:57 +08:00
parent b76831e3fe
commit 08f9974817
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ static int32_t cfgAddItem(SConfig *pCfg, SConfigItem *pItem, const char *name) {
SConfigItem *existItem = taosArrayGet(pCfg->array, i); SConfigItem *existItem = taosArrayGet(pCfg->array, i);
if (existItem != NULL && strcmp(existItem->name, pItem->name) == 0) { if (existItem != NULL && strcmp(existItem->name, pItem->name) == 0) {
taosMemoryFree(pItem->name); taosMemoryFree(pItem->name);
return 0; return TSDB_CODE_INVALID_CFG;
} }
} }