Prevent misconfiguration
This commit is contained in:
parent
b76831e3fe
commit
08f9974817
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue