Fix ci error.

This commit is contained in:
xiao-77 2024-11-26 17:05:07 +08:00
parent d778ada8f9
commit 223e0f55c5
3 changed files with 6 additions and 2 deletions

View File

@ -66,6 +66,7 @@ int32_t taosGetConfigObjSize(SConfigObj *obj) {
if (obj->dtype == CFG_DTYPE_STRING || obj->dtype == CFG_DTYPE_DIR || obj->dtype == CFG_DTYPE_LOCALE ||
obj->dtype == CFG_DTYPE_CHARSET || obj->dtype == CFG_DTYPE_TIMEZONE) {
if (obj->str != NULL) {
size += sizeof(int32_t);
size += strlen(obj->str) + 1;
}
}

View File

@ -758,7 +758,7 @@ SConfigObj *mndInitConfigObj(SConfigItem *pItem) {
case CFG_DTYPE_LOCALE:
case CFG_DTYPE_CHARSET:
case CFG_DTYPE_TIMEZONE:
pObj->str = pItem->str;
pObj->str = taosStrdup(pItem->str);
break;
}
return pObj;

View File

@ -1145,7 +1145,10 @@ SArray *initVariablesFromItems(SArray *pItems) {
strcpy(info.category, "unknown");
break;
}
taosArrayPush(pInfos, &info);
if (NULL == taosArrayPush(pInfos, &info)) {
mError("failed to push info to array while init variables from items,since %s", tstrerror(terrno));
return NULL;
}
}
return pInfos;