[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

@ -56,58 +56,114 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
void OpenAPI_policy_association_update_request_free(OpenAPI_policy_association_update_request_t *policy_association_update_request)
{
OpenAPI_lnode_t *node = NULL;
if (NULL == policy_association_update_request) {
return;
}
OpenAPI_lnode_t *node;
ogs_free(policy_association_update_request->notification_uri);
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv4_addrs, node) {
ogs_free(node->data);
if (policy_association_update_request->notification_uri) {
ogs_free(policy_association_update_request->notification_uri);
policy_association_update_request->notification_uri = NULL;
}
OpenAPI_list_free(policy_association_update_request->alt_notif_ipv4_addrs);
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv6_addrs, node) {
ogs_free(node->data);
if (policy_association_update_request->alt_notif_ipv4_addrs) {
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv4_addrs, node) {
ogs_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->alt_notif_ipv4_addrs);
policy_association_update_request->alt_notif_ipv4_addrs = NULL;
}
OpenAPI_list_free(policy_association_update_request->alt_notif_ipv6_addrs);
OpenAPI_list_for_each(policy_association_update_request->alt_notif_fqdns, node) {
ogs_free(node->data);
if (policy_association_update_request->alt_notif_ipv6_addrs) {
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv6_addrs, node) {
ogs_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->alt_notif_ipv6_addrs);
policy_association_update_request->alt_notif_ipv6_addrs = NULL;
}
OpenAPI_list_free(policy_association_update_request->alt_notif_fqdns);
OpenAPI_list_free(policy_association_update_request->triggers);
OpenAPI_service_area_restriction_free(policy_association_update_request->serv_area_res);
OpenAPI_wireline_service_area_restriction_free(policy_association_update_request->wl_serv_area_res);
OpenAPI_smf_selection_data_free(policy_association_update_request->smf_sel_info);
OpenAPI_ambr_free(policy_association_update_request->ue_ambr);
OpenAPI_list_for_each(policy_association_update_request->pra_statuses, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
ogs_free(localKeyValue->key);
OpenAPI_presence_info_free(localKeyValue->value);
ogs_free(localKeyValue);
if (policy_association_update_request->alt_notif_fqdns) {
OpenAPI_list_for_each(policy_association_update_request->alt_notif_fqdns, node) {
ogs_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->alt_notif_fqdns);
policy_association_update_request->alt_notif_fqdns = NULL;
}
OpenAPI_list_free(policy_association_update_request->pra_statuses);
OpenAPI_user_location_free(policy_association_update_request->user_loc);
OpenAPI_list_for_each(policy_association_update_request->allowed_snssais, node) {
OpenAPI_snssai_free(node->data);
if (policy_association_update_request->triggers) {
OpenAPI_list_free(policy_association_update_request->triggers);
policy_association_update_request->triggers = NULL;
}
OpenAPI_list_free(policy_association_update_request->allowed_snssais);
OpenAPI_list_for_each(policy_association_update_request->mapping_snssais, node) {
OpenAPI_mapping_of_snssai_free(node->data);
if (policy_association_update_request->serv_area_res) {
OpenAPI_service_area_restriction_free(policy_association_update_request->serv_area_res);
policy_association_update_request->serv_area_res = NULL;
}
OpenAPI_list_free(policy_association_update_request->mapping_snssais);
OpenAPI_list_free(policy_association_update_request->access_types);
OpenAPI_list_free(policy_association_update_request->rat_types);
OpenAPI_list_for_each(policy_association_update_request->n3g_allowed_snssais, node) {
OpenAPI_snssai_free(node->data);
if (policy_association_update_request->wl_serv_area_res) {
OpenAPI_wireline_service_area_restriction_free(policy_association_update_request->wl_serv_area_res);
policy_association_update_request->wl_serv_area_res = NULL;
}
if (policy_association_update_request->smf_sel_info) {
OpenAPI_smf_selection_data_free(policy_association_update_request->smf_sel_info);
policy_association_update_request->smf_sel_info = NULL;
}
if (policy_association_update_request->ue_ambr) {
OpenAPI_ambr_free(policy_association_update_request->ue_ambr);
policy_association_update_request->ue_ambr = NULL;
}
if (policy_association_update_request->pra_statuses) {
OpenAPI_list_for_each(policy_association_update_request->pra_statuses, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
ogs_free(localKeyValue->key);
OpenAPI_presence_info_free(localKeyValue->value);
OpenAPI_map_free(localKeyValue);
}
OpenAPI_list_free(policy_association_update_request->pra_statuses);
policy_association_update_request->pra_statuses = NULL;
}
if (policy_association_update_request->user_loc) {
OpenAPI_user_location_free(policy_association_update_request->user_loc);
policy_association_update_request->user_loc = NULL;
}
if (policy_association_update_request->allowed_snssais) {
OpenAPI_list_for_each(policy_association_update_request->allowed_snssais, node) {
OpenAPI_snssai_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->allowed_snssais);
policy_association_update_request->allowed_snssais = NULL;
}
if (policy_association_update_request->mapping_snssais) {
OpenAPI_list_for_each(policy_association_update_request->mapping_snssais, node) {
OpenAPI_mapping_of_snssai_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->mapping_snssais);
policy_association_update_request->mapping_snssais = NULL;
}
if (policy_association_update_request->access_types) {
OpenAPI_list_free(policy_association_update_request->access_types);
policy_association_update_request->access_types = NULL;
}
if (policy_association_update_request->rat_types) {
OpenAPI_list_free(policy_association_update_request->rat_types);
policy_association_update_request->rat_types = NULL;
}
if (policy_association_update_request->n3g_allowed_snssais) {
OpenAPI_list_for_each(policy_association_update_request->n3g_allowed_snssais, node) {
OpenAPI_snssai_free(node->data);
}
OpenAPI_list_free(policy_association_update_request->n3g_allowed_snssais);
policy_association_update_request->n3g_allowed_snssais = NULL;
}
if (policy_association_update_request->trace_req) {
OpenAPI_trace_data_free(policy_association_update_request->trace_req);
policy_association_update_request->trace_req = NULL;
}
if (policy_association_update_request->guami) {
OpenAPI_guami_free(policy_association_update_request->guami);
policy_association_update_request->guami = NULL;
}
OpenAPI_list_free(policy_association_update_request->n3g_allowed_snssais);
OpenAPI_trace_data_free(policy_association_update_request->trace_req);
OpenAPI_guami_free(policy_association_update_request->guami);
ogs_free(policy_association_update_request);
}
cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_association_update_request_t *policy_association_update_request)
{
cJSON *item = NULL;
OpenAPI_lnode_t *node = NULL;
if (policy_association_update_request == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [PolicyAssociationUpdateRequest]");
@ -123,62 +179,55 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
}
if (policy_association_update_request->alt_notif_ipv4_addrs) {
cJSON *alt_notif_ipv4_addrs = cJSON_AddArrayToObject(item, "altNotifIpv4Addrs");
if (alt_notif_ipv4_addrs == NULL) {
cJSON *alt_notif_ipv4_addrsList = cJSON_AddArrayToObject(item, "altNotifIpv4Addrs");
if (alt_notif_ipv4_addrsList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
OpenAPI_lnode_t *alt_notif_ipv4_addrs_node;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv4_addrs, alt_notif_ipv4_addrs_node) {
if (cJSON_AddStringToObject(alt_notif_ipv4_addrs, "", (char*)alt_notif_ipv4_addrs_node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv4_addrs]");
goto end;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv4_addrs, node) {
if (cJSON_AddStringToObject(alt_notif_ipv4_addrsList, "", (char*)node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
}
}
}
if (policy_association_update_request->alt_notif_ipv6_addrs) {
cJSON *alt_notif_ipv6_addrs = cJSON_AddArrayToObject(item, "altNotifIpv6Addrs");
if (alt_notif_ipv6_addrs == NULL) {
cJSON *alt_notif_ipv6_addrsList = cJSON_AddArrayToObject(item, "altNotifIpv6Addrs");
if (alt_notif_ipv6_addrsList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
OpenAPI_lnode_t *alt_notif_ipv6_addrs_node;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv6_addrs, alt_notif_ipv6_addrs_node) {
if (cJSON_AddStringToObject(alt_notif_ipv6_addrs, "", (char*)alt_notif_ipv6_addrs_node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv6_addrs]");
goto end;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_ipv6_addrs, node) {
if (cJSON_AddStringToObject(alt_notif_ipv6_addrsList, "", (char*)node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
}
}
}
if (policy_association_update_request->alt_notif_fqdns) {
cJSON *alt_notif_fqdns = cJSON_AddArrayToObject(item, "altNotifFqdns");
if (alt_notif_fqdns == NULL) {
cJSON *alt_notif_fqdnsList = cJSON_AddArrayToObject(item, "altNotifFqdns");
if (alt_notif_fqdnsList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_fqdns]");
goto end;
}
OpenAPI_lnode_t *alt_notif_fqdns_node;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_fqdns, alt_notif_fqdns_node) {
if (cJSON_AddStringToObject(alt_notif_fqdns, "", (char*)alt_notif_fqdns_node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_fqdns]");
goto end;
OpenAPI_list_for_each(policy_association_update_request->alt_notif_fqdns, node) {
if (cJSON_AddStringToObject(alt_notif_fqdnsList, "", (char*)node->data) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [alt_notif_fqdns]");
goto end;
}
}
}
}
if (policy_association_update_request->triggers) {
cJSON *triggers = cJSON_AddArrayToObject(item, "triggers");
if (triggers == NULL) {
if (policy_association_update_request->triggers != OpenAPI_request_trigger_NULL) {
cJSON *triggersList = cJSON_AddArrayToObject(item, "triggers");
if (triggersList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [triggers]");
goto end;
}
OpenAPI_lnode_t *triggers_node;
OpenAPI_list_for_each(policy_association_update_request->triggers, triggers_node) {
if (cJSON_AddStringToObject(triggers, "", OpenAPI_request_trigger_ToString((intptr_t)triggers_node->data)) == NULL) {
OpenAPI_list_for_each(policy_association_update_request->triggers, node) {
if (cJSON_AddStringToObject(triggersList, "", OpenAPI_request_trigger_ToString((intptr_t)node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [triggers]");
goto end;
}
@ -251,21 +300,20 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
goto end;
}
cJSON *localMapObject = pra_statuses;
OpenAPI_lnode_t *pra_statuses_node;
if (policy_association_update_request->pra_statuses) {
OpenAPI_list_for_each(policy_association_update_request->pra_statuses, pra_statuses_node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)pra_statuses_node->data;
cJSON *itemLocal = localKeyValue->value ?
OpenAPI_presence_info_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [inner]");
goto end;
}
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
OpenAPI_list_for_each(policy_association_update_request->pra_statuses, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
cJSON *itemLocal = localKeyValue->value ?
OpenAPI_presence_info_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [inner]");
goto end;
}
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
}
}
}
if (policy_association_update_request->user_loc) {
cJSON *user_loc_local_JSON = OpenAPI_user_location_convertToJSON(policy_association_update_request->user_loc);
@ -286,17 +334,13 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [allowed_snssais]");
goto end;
}
OpenAPI_lnode_t *allowed_snssais_node;
if (policy_association_update_request->allowed_snssais) {
OpenAPI_list_for_each(policy_association_update_request->allowed_snssais, allowed_snssais_node) {
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(allowed_snssais_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [allowed_snssais]");
goto end;
}
cJSON_AddItemToArray(allowed_snssaisList, itemLocal);
OpenAPI_list_for_each(policy_association_update_request->allowed_snssais, node) {
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [allowed_snssais]");
goto end;
}
cJSON_AddItemToArray(allowed_snssaisList, itemLocal);
}
}
@ -306,44 +350,38 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [mapping_snssais]");
goto end;
}
OpenAPI_lnode_t *mapping_snssais_node;
if (policy_association_update_request->mapping_snssais) {
OpenAPI_list_for_each(policy_association_update_request->mapping_snssais, mapping_snssais_node) {
cJSON *itemLocal = OpenAPI_mapping_of_snssai_convertToJSON(mapping_snssais_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [mapping_snssais]");
goto end;
}
cJSON_AddItemToArray(mapping_snssaisList, itemLocal);
OpenAPI_list_for_each(policy_association_update_request->mapping_snssais, node) {
cJSON *itemLocal = OpenAPI_mapping_of_snssai_convertToJSON(node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [mapping_snssais]");
goto end;
}
cJSON_AddItemToArray(mapping_snssaisList, itemLocal);
}
}
if (policy_association_update_request->access_types) {
cJSON *access_types = cJSON_AddArrayToObject(item, "accessTypes");
if (access_types == NULL) {
if (policy_association_update_request->access_types != OpenAPI_access_type_NULL) {
cJSON *access_typesList = cJSON_AddArrayToObject(item, "accessTypes");
if (access_typesList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [access_types]");
goto end;
}
OpenAPI_lnode_t *access_types_node;
OpenAPI_list_for_each(policy_association_update_request->access_types, access_types_node) {
if (cJSON_AddStringToObject(access_types, "", OpenAPI_access_type_ToString((intptr_t)access_types_node->data)) == NULL) {
OpenAPI_list_for_each(policy_association_update_request->access_types, node) {
if (cJSON_AddStringToObject(access_typesList, "", OpenAPI_access_type_ToString((intptr_t)node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [access_types]");
goto end;
}
}
}
if (policy_association_update_request->rat_types) {
cJSON *rat_types = cJSON_AddArrayToObject(item, "ratTypes");
if (rat_types == NULL) {
if (policy_association_update_request->rat_types != OpenAPI_rat_type_NULL) {
cJSON *rat_typesList = cJSON_AddArrayToObject(item, "ratTypes");
if (rat_typesList == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [rat_types]");
goto end;
}
OpenAPI_lnode_t *rat_types_node;
OpenAPI_list_for_each(policy_association_update_request->rat_types, rat_types_node) {
if (cJSON_AddStringToObject(rat_types, "", OpenAPI_rat_type_ToString((intptr_t)rat_types_node->data)) == NULL) {
OpenAPI_list_for_each(policy_association_update_request->rat_types, node) {
if (cJSON_AddStringToObject(rat_typesList, "", OpenAPI_rat_type_ToString((intptr_t)node->data)) == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [rat_types]");
goto end;
}
@ -356,17 +394,13 @@ cJSON *OpenAPI_policy_association_update_request_convertToJSON(OpenAPI_policy_as
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [n3g_allowed_snssais]");
goto end;
}
OpenAPI_lnode_t *n3g_allowed_snssais_node;
if (policy_association_update_request->n3g_allowed_snssais) {
OpenAPI_list_for_each(policy_association_update_request->n3g_allowed_snssais, n3g_allowed_snssais_node) {
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(n3g_allowed_snssais_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [n3g_allowed_snssais]");
goto end;
}
cJSON_AddItemToArray(n3g_allowed_snssaisList, itemLocal);
OpenAPI_list_for_each(policy_association_update_request->n3g_allowed_snssais, node) {
cJSON *itemLocal = OpenAPI_snssai_convertToJSON(node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_policy_association_update_request_convertToJSON() failed [n3g_allowed_snssais]");
goto end;
}
cJSON_AddItemToArray(n3g_allowed_snssaisList, itemLocal);
}
}
@ -403,113 +437,144 @@ end:
OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_request_parseFromJSON(cJSON *policy_association_update_requestJSON)
{
OpenAPI_policy_association_update_request_t *policy_association_update_request_local_var = NULL;
cJSON *notification_uri = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "notificationUri");
OpenAPI_lnode_t *node = NULL;
cJSON *notification_uri = NULL;
cJSON *alt_notif_ipv4_addrs = NULL;
OpenAPI_list_t *alt_notif_ipv4_addrsList = NULL;
cJSON *alt_notif_ipv6_addrs = NULL;
OpenAPI_list_t *alt_notif_ipv6_addrsList = NULL;
cJSON *alt_notif_fqdns = NULL;
OpenAPI_list_t *alt_notif_fqdnsList = NULL;
cJSON *triggers = NULL;
OpenAPI_list_t *triggersList = NULL;
cJSON *serv_area_res = NULL;
OpenAPI_service_area_restriction_t *serv_area_res_local_nonprim = NULL;
cJSON *wl_serv_area_res = NULL;
OpenAPI_wireline_service_area_restriction_t *wl_serv_area_res_local_nonprim = NULL;
cJSON *rfsp = NULL;
cJSON *smf_sel_info = NULL;
OpenAPI_smf_selection_data_t *smf_sel_info_local_nonprim = NULL;
cJSON *ue_ambr = NULL;
OpenAPI_ambr_t *ue_ambr_local_nonprim = NULL;
cJSON *pra_statuses = NULL;
OpenAPI_list_t *pra_statusesList = NULL;
cJSON *user_loc = NULL;
OpenAPI_user_location_t *user_loc_local_nonprim = NULL;
cJSON *allowed_snssais = NULL;
OpenAPI_list_t *allowed_snssaisList = NULL;
cJSON *mapping_snssais = NULL;
OpenAPI_list_t *mapping_snssaisList = NULL;
cJSON *access_types = NULL;
OpenAPI_list_t *access_typesList = NULL;
cJSON *rat_types = NULL;
OpenAPI_list_t *rat_typesList = NULL;
cJSON *n3g_allowed_snssais = NULL;
OpenAPI_list_t *n3g_allowed_snssaisList = NULL;
cJSON *trace_req = NULL;
OpenAPI_trace_data_t *trace_req_local_nonprim = NULL;
cJSON *guami = NULL;
OpenAPI_guami_t *guami_local_nonprim = NULL;
notification_uri = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "notificationUri");
if (notification_uri) {
if (!cJSON_IsString(notification_uri)) {
if (!cJSON_IsString(notification_uri) && !cJSON_IsNull(notification_uri)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [notification_uri]");
goto end;
}
}
cJSON *alt_notif_ipv4_addrs = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifIpv4Addrs");
OpenAPI_list_t *alt_notif_ipv4_addrsList;
alt_notif_ipv4_addrs = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifIpv4Addrs");
if (alt_notif_ipv4_addrs) {
cJSON *alt_notif_ipv4_addrs_local;
if (!cJSON_IsArray(alt_notif_ipv4_addrs)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
alt_notif_ipv4_addrsList = OpenAPI_list_create();
cJSON *alt_notif_ipv4_addrs_local = NULL;
if (!cJSON_IsArray(alt_notif_ipv4_addrs)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
cJSON_ArrayForEach(alt_notif_ipv4_addrs_local, alt_notif_ipv4_addrs) {
if (!cJSON_IsString(alt_notif_ipv4_addrs_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
OpenAPI_list_add(alt_notif_ipv4_addrsList, ogs_strdup(alt_notif_ipv4_addrs_local->valuestring));
}
alt_notif_ipv4_addrsList = OpenAPI_list_create();
cJSON_ArrayForEach(alt_notif_ipv4_addrs_local, alt_notif_ipv4_addrs) {
double *localDouble = NULL;
int *localInt = NULL;
if (!cJSON_IsString(alt_notif_ipv4_addrs_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv4_addrs]");
goto end;
}
OpenAPI_list_add(alt_notif_ipv4_addrsList, ogs_strdup(alt_notif_ipv4_addrs_local->valuestring));
}
}
cJSON *alt_notif_ipv6_addrs = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifIpv6Addrs");
OpenAPI_list_t *alt_notif_ipv6_addrsList;
alt_notif_ipv6_addrs = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifIpv6Addrs");
if (alt_notif_ipv6_addrs) {
cJSON *alt_notif_ipv6_addrs_local;
if (!cJSON_IsArray(alt_notif_ipv6_addrs)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
alt_notif_ipv6_addrsList = OpenAPI_list_create();
cJSON *alt_notif_ipv6_addrs_local = NULL;
if (!cJSON_IsArray(alt_notif_ipv6_addrs)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
cJSON_ArrayForEach(alt_notif_ipv6_addrs_local, alt_notif_ipv6_addrs) {
if (!cJSON_IsString(alt_notif_ipv6_addrs_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
OpenAPI_list_add(alt_notif_ipv6_addrsList, ogs_strdup(alt_notif_ipv6_addrs_local->valuestring));
}
alt_notif_ipv6_addrsList = OpenAPI_list_create();
cJSON_ArrayForEach(alt_notif_ipv6_addrs_local, alt_notif_ipv6_addrs) {
double *localDouble = NULL;
int *localInt = NULL;
if (!cJSON_IsString(alt_notif_ipv6_addrs_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv6_addrs]");
goto end;
}
OpenAPI_list_add(alt_notif_ipv6_addrsList, ogs_strdup(alt_notif_ipv6_addrs_local->valuestring));
}
}
cJSON *alt_notif_fqdns = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifFqdns");
OpenAPI_list_t *alt_notif_fqdnsList;
alt_notif_fqdns = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "altNotifFqdns");
if (alt_notif_fqdns) {
cJSON *alt_notif_fqdns_local;
if (!cJSON_IsArray(alt_notif_fqdns)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_fqdns]");
goto end;
}
alt_notif_fqdnsList = OpenAPI_list_create();
cJSON *alt_notif_fqdns_local = NULL;
if (!cJSON_IsArray(alt_notif_fqdns)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_fqdns]");
goto end;
}
cJSON_ArrayForEach(alt_notif_fqdns_local, alt_notif_fqdns) {
if (!cJSON_IsString(alt_notif_fqdns_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_fqdns]");
goto end;
}
OpenAPI_list_add(alt_notif_fqdnsList, ogs_strdup(alt_notif_fqdns_local->valuestring));
}
alt_notif_fqdnsList = OpenAPI_list_create();
cJSON_ArrayForEach(alt_notif_fqdns_local, alt_notif_fqdns) {
double *localDouble = NULL;
int *localInt = NULL;
if (!cJSON_IsString(alt_notif_fqdns_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_fqdns]");
goto end;
}
OpenAPI_list_add(alt_notif_fqdnsList, ogs_strdup(alt_notif_fqdns_local->valuestring));
}
}
cJSON *triggers = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "triggers");
OpenAPI_list_t *triggersList;
triggers = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "triggers");
if (triggers) {
cJSON *triggers_local_nonprimitive;
if (!cJSON_IsArray(triggers)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [triggers]");
goto end;
}
triggersList = OpenAPI_list_create();
cJSON_ArrayForEach(triggers_local_nonprimitive, triggers ) {
if (!cJSON_IsString(triggers_local_nonprimitive)){
cJSON *triggers_local = NULL;
if (!cJSON_IsArray(triggers)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [triggers]");
goto end;
}
OpenAPI_list_add(triggersList, (void *)OpenAPI_request_trigger_FromString(triggers_local_nonprimitive->valuestring));
}
triggersList = OpenAPI_list_create();
cJSON_ArrayForEach(triggers_local, triggers) {
if (!cJSON_IsString(triggers_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [triggers]");
goto end;
}
OpenAPI_list_add(triggersList, (void *)OpenAPI_request_trigger_FromString(triggers_local->valuestring));
}
}
cJSON *serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "servAreaRes");
OpenAPI_service_area_restriction_t *serv_area_res_local_nonprim = NULL;
serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "servAreaRes");
if (serv_area_res) {
serv_area_res_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(serv_area_res);
}
cJSON *wl_serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "wlServAreaRes");
OpenAPI_wireline_service_area_restriction_t *wl_serv_area_res_local_nonprim = NULL;
wl_serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "wlServAreaRes");
if (wl_serv_area_res) {
wl_serv_area_res_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wl_serv_area_res);
}
cJSON *rfsp = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "rfsp");
rfsp = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "rfsp");
if (rfsp) {
if (!cJSON_IsNumber(rfsp)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [rfsp]");
@ -517,200 +582,172 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
}
}
cJSON *smf_sel_info = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "smfSelInfo");
OpenAPI_smf_selection_data_t *smf_sel_info_local_nonprim = NULL;
smf_sel_info = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "smfSelInfo");
if (smf_sel_info) {
smf_sel_info_local_nonprim = OpenAPI_smf_selection_data_parseFromJSON(smf_sel_info);
}
cJSON *ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ueAmbr");
OpenAPI_ambr_t *ue_ambr_local_nonprim = NULL;
ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ueAmbr");
if (ue_ambr) {
ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(ue_ambr);
}
cJSON *pra_statuses = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "praStatuses");
OpenAPI_list_t *pra_statusesList;
pra_statuses = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "praStatuses");
if (pra_statuses) {
cJSON *pra_statuses_local_map;
if (!cJSON_IsObject(pra_statuses)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [pra_statuses]");
goto end;
}
pra_statusesList = OpenAPI_list_create();
OpenAPI_map_t *localMapKeyPair = NULL;
cJSON_ArrayForEach(pra_statuses_local_map, pra_statuses) {
cJSON *localMapObject = pra_statuses_local_map;
if (cJSON_IsObject(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(
ogs_strdup(localMapObject->string), OpenAPI_presence_info_parseFromJSON(localMapObject));
} else if (cJSON_IsNull(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
} else {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [inner]");
cJSON *pra_statuses_local_map = NULL;
if (!cJSON_IsObject(pra_statuses) && !cJSON_IsNull(pra_statuses)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [pra_statuses]");
goto end;
}
OpenAPI_list_add(pra_statusesList, localMapKeyPair);
}
if (cJSON_IsObject(pra_statuses)) {
pra_statusesList = OpenAPI_list_create();
OpenAPI_map_t *localMapKeyPair = NULL;
cJSON_ArrayForEach(pra_statuses_local_map, pra_statuses) {
cJSON *localMapObject = pra_statuses_local_map;
if (cJSON_IsObject(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(
ogs_strdup(localMapObject->string), OpenAPI_presence_info_parseFromJSON(localMapObject));
} else if (cJSON_IsNull(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
} else {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [inner]");
goto end;
}
OpenAPI_list_add(pra_statusesList, localMapKeyPair);
}
}
}
cJSON *user_loc = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "userLoc");
OpenAPI_user_location_t *user_loc_local_nonprim = NULL;
user_loc = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "userLoc");
if (user_loc) {
user_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(user_loc);
}
cJSON *allowed_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "allowedSnssais");
OpenAPI_list_t *allowed_snssaisList;
allowed_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "allowedSnssais");
if (allowed_snssais) {
cJSON *allowed_snssais_local_nonprimitive;
if (!cJSON_IsArray(allowed_snssais)){
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [allowed_snssais]");
goto end;
}
allowed_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(allowed_snssais_local_nonprimitive, allowed_snssais ) {
if (!cJSON_IsObject(allowed_snssais_local_nonprimitive)) {
cJSON *allowed_snssais_local = NULL;
if (!cJSON_IsArray(allowed_snssais)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [allowed_snssais]");
goto end;
}
OpenAPI_snssai_t *allowed_snssaisItem = OpenAPI_snssai_parseFromJSON(allowed_snssais_local_nonprimitive);
if (!allowed_snssaisItem) {
ogs_error("No allowed_snssaisItem");
OpenAPI_list_free(allowed_snssaisList);
goto end;
allowed_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(allowed_snssais_local, allowed_snssais) {
if (!cJSON_IsObject(allowed_snssais_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [allowed_snssais]");
goto end;
}
OpenAPI_snssai_t *allowed_snssaisItem = OpenAPI_snssai_parseFromJSON(allowed_snssais_local);
if (!allowed_snssaisItem) {
ogs_error("No allowed_snssaisItem");
OpenAPI_list_free(allowed_snssaisList);
goto end;
}
OpenAPI_list_add(allowed_snssaisList, allowed_snssaisItem);
}
OpenAPI_list_add(allowed_snssaisList, allowed_snssaisItem);
}
}
cJSON *mapping_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "mappingSnssais");
OpenAPI_list_t *mapping_snssaisList;
mapping_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "mappingSnssais");
if (mapping_snssais) {
cJSON *mapping_snssais_local_nonprimitive;
if (!cJSON_IsArray(mapping_snssais)){
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [mapping_snssais]");
goto end;
}
mapping_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(mapping_snssais_local_nonprimitive, mapping_snssais ) {
if (!cJSON_IsObject(mapping_snssais_local_nonprimitive)) {
cJSON *mapping_snssais_local = NULL;
if (!cJSON_IsArray(mapping_snssais)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [mapping_snssais]");
goto end;
}
OpenAPI_mapping_of_snssai_t *mapping_snssaisItem = OpenAPI_mapping_of_snssai_parseFromJSON(mapping_snssais_local_nonprimitive);
if (!mapping_snssaisItem) {
ogs_error("No mapping_snssaisItem");
OpenAPI_list_free(mapping_snssaisList);
goto end;
mapping_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(mapping_snssais_local, mapping_snssais) {
if (!cJSON_IsObject(mapping_snssais_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [mapping_snssais]");
goto end;
}
OpenAPI_mapping_of_snssai_t *mapping_snssaisItem = OpenAPI_mapping_of_snssai_parseFromJSON(mapping_snssais_local);
if (!mapping_snssaisItem) {
ogs_error("No mapping_snssaisItem");
OpenAPI_list_free(mapping_snssaisList);
goto end;
}
OpenAPI_list_add(mapping_snssaisList, mapping_snssaisItem);
}
OpenAPI_list_add(mapping_snssaisList, mapping_snssaisItem);
}
}
cJSON *access_types = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "accessTypes");
OpenAPI_list_t *access_typesList;
access_types = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "accessTypes");
if (access_types) {
cJSON *access_types_local_nonprimitive;
if (!cJSON_IsArray(access_types)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [access_types]");
goto end;
}
access_typesList = OpenAPI_list_create();
cJSON_ArrayForEach(access_types_local_nonprimitive, access_types ) {
if (!cJSON_IsString(access_types_local_nonprimitive)){
cJSON *access_types_local = NULL;
if (!cJSON_IsArray(access_types)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [access_types]");
goto end;
}
OpenAPI_list_add(access_typesList, (void *)OpenAPI_access_type_FromString(access_types_local_nonprimitive->valuestring));
}
access_typesList = OpenAPI_list_create();
cJSON_ArrayForEach(access_types_local, access_types) {
if (!cJSON_IsString(access_types_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [access_types]");
goto end;
}
OpenAPI_list_add(access_typesList, (void *)OpenAPI_access_type_FromString(access_types_local->valuestring));
}
}
cJSON *rat_types = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ratTypes");
OpenAPI_list_t *rat_typesList;
rat_types = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ratTypes");
if (rat_types) {
cJSON *rat_types_local_nonprimitive;
if (!cJSON_IsArray(rat_types)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [rat_types]");
goto end;
}
rat_typesList = OpenAPI_list_create();
cJSON_ArrayForEach(rat_types_local_nonprimitive, rat_types ) {
if (!cJSON_IsString(rat_types_local_nonprimitive)){
cJSON *rat_types_local = NULL;
if (!cJSON_IsArray(rat_types)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [rat_types]");
goto end;
}
OpenAPI_list_add(rat_typesList, (void *)OpenAPI_rat_type_FromString(rat_types_local_nonprimitive->valuestring));
}
rat_typesList = OpenAPI_list_create();
cJSON_ArrayForEach(rat_types_local, rat_types) {
if (!cJSON_IsString(rat_types_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [rat_types]");
goto end;
}
OpenAPI_list_add(rat_typesList, (void *)OpenAPI_rat_type_FromString(rat_types_local->valuestring));
}
}
cJSON *n3g_allowed_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "n3gAllowedSnssais");
OpenAPI_list_t *n3g_allowed_snssaisList;
n3g_allowed_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "n3gAllowedSnssais");
if (n3g_allowed_snssais) {
cJSON *n3g_allowed_snssais_local_nonprimitive;
if (!cJSON_IsArray(n3g_allowed_snssais)){
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [n3g_allowed_snssais]");
goto end;
}
n3g_allowed_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(n3g_allowed_snssais_local_nonprimitive, n3g_allowed_snssais ) {
if (!cJSON_IsObject(n3g_allowed_snssais_local_nonprimitive)) {
cJSON *n3g_allowed_snssais_local = NULL;
if (!cJSON_IsArray(n3g_allowed_snssais)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [n3g_allowed_snssais]");
goto end;
}
OpenAPI_snssai_t *n3g_allowed_snssaisItem = OpenAPI_snssai_parseFromJSON(n3g_allowed_snssais_local_nonprimitive);
if (!n3g_allowed_snssaisItem) {
ogs_error("No n3g_allowed_snssaisItem");
OpenAPI_list_free(n3g_allowed_snssaisList);
goto end;
n3g_allowed_snssaisList = OpenAPI_list_create();
cJSON_ArrayForEach(n3g_allowed_snssais_local, n3g_allowed_snssais) {
if (!cJSON_IsObject(n3g_allowed_snssais_local)) {
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [n3g_allowed_snssais]");
goto end;
}
OpenAPI_snssai_t *n3g_allowed_snssaisItem = OpenAPI_snssai_parseFromJSON(n3g_allowed_snssais_local);
if (!n3g_allowed_snssaisItem) {
ogs_error("No n3g_allowed_snssaisItem");
OpenAPI_list_free(n3g_allowed_snssaisList);
goto end;
}
OpenAPI_list_add(n3g_allowed_snssaisList, n3g_allowed_snssaisItem);
}
OpenAPI_list_add(n3g_allowed_snssaisList, n3g_allowed_snssaisItem);
}
}
cJSON *trace_req = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "traceReq");
OpenAPI_trace_data_t *trace_req_local_nonprim = NULL;
trace_req = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "traceReq");
if (trace_req) {
trace_req_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_req);
}
cJSON *guami = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "guami");
OpenAPI_guami_t *guami_local_nonprim = NULL;
guami = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "guami");
if (guami) {
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
}
policy_association_update_request_local_var = OpenAPI_policy_association_update_request_create (
notification_uri ? ogs_strdup(notification_uri->valuestring) : NULL,
notification_uri && !cJSON_IsNull(notification_uri) ? ogs_strdup(notification_uri->valuestring) : NULL,
alt_notif_ipv4_addrs ? alt_notif_ipv4_addrsList : NULL,
alt_notif_ipv6_addrs ? alt_notif_ipv6_addrsList : NULL,
alt_notif_fqdns ? alt_notif_fqdnsList : NULL,
@ -734,6 +771,98 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
return policy_association_update_request_local_var;
end:
if (alt_notif_ipv4_addrsList) {
OpenAPI_list_for_each(alt_notif_ipv4_addrsList, node) {
ogs_free(node->data);
}
OpenAPI_list_free(alt_notif_ipv4_addrsList);
alt_notif_ipv4_addrsList = NULL;
}
if (alt_notif_ipv6_addrsList) {
OpenAPI_list_for_each(alt_notif_ipv6_addrsList, node) {
ogs_free(node->data);
}
OpenAPI_list_free(alt_notif_ipv6_addrsList);
alt_notif_ipv6_addrsList = NULL;
}
if (alt_notif_fqdnsList) {
OpenAPI_list_for_each(alt_notif_fqdnsList, node) {
ogs_free(node->data);
}
OpenAPI_list_free(alt_notif_fqdnsList);
alt_notif_fqdnsList = NULL;
}
if (triggersList) {
OpenAPI_list_free(triggersList);
triggersList = NULL;
}
if (serv_area_res_local_nonprim) {
OpenAPI_service_area_restriction_free(serv_area_res_local_nonprim);
serv_area_res_local_nonprim = NULL;
}
if (wl_serv_area_res_local_nonprim) {
OpenAPI_wireline_service_area_restriction_free(wl_serv_area_res_local_nonprim);
wl_serv_area_res_local_nonprim = NULL;
}
if (smf_sel_info_local_nonprim) {
OpenAPI_smf_selection_data_free(smf_sel_info_local_nonprim);
smf_sel_info_local_nonprim = NULL;
}
if (ue_ambr_local_nonprim) {
OpenAPI_ambr_free(ue_ambr_local_nonprim);
ue_ambr_local_nonprim = NULL;
}
if (pra_statusesList) {
OpenAPI_list_for_each(pra_statusesList, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*) node->data;
ogs_free(localKeyValue->key);
OpenAPI_presence_info_free(localKeyValue->value);
OpenAPI_map_free(localKeyValue);
}
OpenAPI_list_free(pra_statusesList);
pra_statusesList = NULL;
}
if (user_loc_local_nonprim) {
OpenAPI_user_location_free(user_loc_local_nonprim);
user_loc_local_nonprim = NULL;
}
if (allowed_snssaisList) {
OpenAPI_list_for_each(allowed_snssaisList, node) {
OpenAPI_snssai_free(node->data);
}
OpenAPI_list_free(allowed_snssaisList);
allowed_snssaisList = NULL;
}
if (mapping_snssaisList) {
OpenAPI_list_for_each(mapping_snssaisList, node) {
OpenAPI_mapping_of_snssai_free(node->data);
}
OpenAPI_list_free(mapping_snssaisList);
mapping_snssaisList = NULL;
}
if (access_typesList) {
OpenAPI_list_free(access_typesList);
access_typesList = NULL;
}
if (rat_typesList) {
OpenAPI_list_free(rat_typesList);
rat_typesList = NULL;
}
if (n3g_allowed_snssaisList) {
OpenAPI_list_for_each(n3g_allowed_snssaisList, node) {
OpenAPI_snssai_free(node->data);
}
OpenAPI_list_free(n3g_allowed_snssaisList);
n3g_allowed_snssaisList = NULL;
}
if (trace_req_local_nonprim) {
OpenAPI_trace_data_free(trace_req_local_nonprim);
trace_req_local_nonprim = NULL;
}
if (guami_local_nonprim) {
OpenAPI_guami_free(guami_local_nonprim);
guami_local_nonprim = NULL;
}
return NULL;
}