[SBI] Crash occurs when ENUM in the MAP (#2103)

This commit is contained in:
Sukchan Lee 2023-03-01 17:50:25 +09:00
parent ce668c556c
commit 969c116e77
1097 changed files with 266728 additions and 42047 deletions

View file

@ -18,17 +18,22 @@ OpenAPI_ulcl_bp_information_t *OpenAPI_ulcl_bp_information_create(
void OpenAPI_ulcl_bp_information_free(OpenAPI_ulcl_bp_information_t *ulcl_bp_information)
{
OpenAPI_lnode_t *node = NULL;
if (NULL == ulcl_bp_information) {
return;
}
OpenAPI_lnode_t *node;
ogs_free(ulcl_bp_information->ulcl_bp_upf_id);
if (ulcl_bp_information->ulcl_bp_upf_id) {
ogs_free(ulcl_bp_information->ulcl_bp_upf_id);
ulcl_bp_information->ulcl_bp_upf_id = NULL;
}
ogs_free(ulcl_bp_information);
}
cJSON *OpenAPI_ulcl_bp_information_convertToJSON(OpenAPI_ulcl_bp_information_t *ulcl_bp_information)
{
cJSON *item = NULL;
OpenAPI_lnode_t *node = NULL;
if (ulcl_bp_information == NULL) {
ogs_error("OpenAPI_ulcl_bp_information_convertToJSON() failed [UlclBpInformation]");
@ -50,17 +55,18 @@ end:
OpenAPI_ulcl_bp_information_t *OpenAPI_ulcl_bp_information_parseFromJSON(cJSON *ulcl_bp_informationJSON)
{
OpenAPI_ulcl_bp_information_t *ulcl_bp_information_local_var = NULL;
cJSON *ulcl_bp_upf_id = cJSON_GetObjectItemCaseSensitive(ulcl_bp_informationJSON, "ulclBpUpfId");
OpenAPI_lnode_t *node = NULL;
cJSON *ulcl_bp_upf_id = NULL;
ulcl_bp_upf_id = cJSON_GetObjectItemCaseSensitive(ulcl_bp_informationJSON, "ulclBpUpfId");
if (ulcl_bp_upf_id) {
if (!cJSON_IsString(ulcl_bp_upf_id)) {
if (!cJSON_IsString(ulcl_bp_upf_id) && !cJSON_IsNull(ulcl_bp_upf_id)) {
ogs_error("OpenAPI_ulcl_bp_information_parseFromJSON() failed [ulcl_bp_upf_id]");
goto end;
}
}
ulcl_bp_information_local_var = OpenAPI_ulcl_bp_information_create (
ulcl_bp_upf_id ? ogs_strdup(ulcl_bp_upf_id->valuestring) : NULL
ulcl_bp_upf_id && !cJSON_IsNull(ulcl_bp_upf_id) ? ogs_strdup(ulcl_bp_upf_id->valuestring) : NULL
);
return ulcl_bp_information_local_var;