From 6b17bffdfd7de38848ac2290cdfaa6237a95cb8b Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Wed, 15 Mar 2023 20:40:07 +0900 Subject: [PATCH] [SBI] Modified Exception handler on error (#2169) --- ...e_data_subs_to_notify_post_request_inner.c | 4 + lib/sbi/openapi/model/abnormal_behaviour.c | 12 ++ .../openapi/model/access_and_mobility_data.c | 14 ++- .../access_and_mobility_subscription_data.c | 57 +++++++++- .../access_and_mobility_subscription_data_1.c | 57 +++++++++- .../model/access_net_charging_identifier.c | 1 - lib/sbi/openapi/model/access_token_req.c | 16 ++- .../openapi/model/additional_ee_subs_info.c | 9 +- .../openapi/model/additional_measurement.c | 14 ++- .../openapi/model/additional_snssai_data.c | 4 + .../openapi/model/additional_snssai_data_1.c | 4 + lib/sbi/openapi/model/addr_fqdn.c | 4 + lib/sbi/openapi/model/af_coordination_info.c | 1 - lib/sbi/openapi/model/af_event_notification.c | 1 - lib/sbi/openapi/model/af_external.c | 5 +- .../openapi/model/af_routing_requirement.c | 11 +- .../openapi/model/af_routing_requirement_rm.c | 11 +- lib/sbi/openapi/model/allowed_nssai.c | 1 - lib/sbi/openapi/model/allowed_snssai.c | 9 +- lib/sbi/openapi/model/am_influ_data.c | 3 - .../openapi/model/am_requested_value_rep.c | 6 +- .../model/amf3_gpp_access_registration.c | 17 ++- ...mf3_gpp_access_registration_modification.c | 9 +- lib/sbi/openapi/model/amf_event.c | 24 +++- lib/sbi/openapi/model/amf_event_area.c | 12 ++ lib/sbi/openapi/model/amf_event_mode.c | 4 + .../openapi/model/amf_event_subscription.c | 5 +- lib/sbi/openapi/model/amf_info.c | 9 +- .../model/amf_non3_gpp_access_registration.c | 13 ++- ...on3_gpp_access_registration_modification.c | 5 +- .../model/amf_status_change_notification.c | 1 - lib/sbi/openapi/model/amf_status_info.c | 1 - lib/sbi/openapi/model/amf_subscription_info.c | 4 + .../model/analytics_metadata_indication.c | 9 +- .../openapi/model/analytics_metadata_info.c | 13 ++- .../openapi/model/analytics_subscription.c | 1 - lib/sbi/openapi/model/api_ie_mapping.c | 5 +- lib/sbi/openapi/model/app_detection_info.c | 1 - lib/sbi/openapi/model/app_list_for_ue_comm.c | 4 + lib/sbi/openapi/model/app_session_context.c | 12 ++ .../model/app_session_context_req_data.c | 21 +++- .../model/app_session_context_resp_data.c | 1 - .../model/app_session_context_update_data.c | 21 +++- .../app_session_context_update_data_patch.c | 4 + .../model/application_data_change_notif.c | 20 ++++ lib/sbi/openapi/model/application_data_subs.c | 2 - lib/sbi/openapi/model/area_of_validity.c | 1 - lib/sbi/openapi/model/assign_ebi_data.c | 6 +- lib/sbi/openapi/model/assign_ebi_error.c | 8 ++ lib/sbi/openapi/model/assign_ebi_failed.c | 1 - lib/sbi/openapi/model/assigned_ebi_data.c | 2 - lib/sbi/openapi/model/ausf_info.c | 2 - lib/sbi/openapi/model/authentication_info.c | 8 ++ .../model/authentication_info_request.c | 4 + .../model/authentication_info_result.c | 5 +- .../model/authentication_subscription.c | 4 + lib/sbi/openapi/model/authorization_data.c | 3 - lib/sbi/openapi/model/authorization_info.c | 8 ++ .../openapi/model/authorized_default_qos.c | 4 + .../model/authorized_network_slice_info.c | 10 +- lib/sbi/openapi/model/backup_amf_info.c | 1 - lib/sbi/openapi/model/bdt_data.c | 20 ++++ lib/sbi/openapi/model/bdt_data_patch.c | 8 ++ lib/sbi/openapi/model/bdt_policy_data.c | 4 + lib/sbi/openapi/model/binding_resp.c | 1 - .../openapi/model/bsf_event_notification.c | 6 +- lib/sbi/openapi/model/bsf_info.c | 4 - lib/sbi/openapi/model/bsf_notification.c | 1 - lib/sbi/openapi/model/bsf_subscription.c | 5 +- lib/sbi/openapi/model/bsf_subscription_resp.c | 6 +- .../cancel_relocate_ue_context_request.c | 4 + .../openapi/model/candidate_for_replacement.c | 4 + lib/sbi/openapi/model/cell_global_id.c | 4 + lib/sbi/openapi/model/chf_info.c | 3 - .../openapi/model/circumstance_description.c | 4 + lib/sbi/openapi/model/class_criterion.c | 8 ++ lib/sbi/openapi/model/cm_info.c | 4 + lib/sbi/openapi/model/cn_assisted_ran_para.c | 8 ++ lib/sbi/openapi/model/cnf.c | 1 - lib/sbi/openapi/model/cnf_unit.c | 1 - .../model/communication_characteristics.c | 20 ++++ lib/sbi/openapi/model/complex_query.c | 2 - lib/sbi/openapi/model/configured_snssai.c | 8 ++ .../model/confirmation_data_response.c | 1 - lib/sbi/openapi/model/congestion_info.c | 14 ++- .../openapi/model/consumer_nf_information.c | 1 - lib/sbi/openapi/model/context_data_sets.c | 32 +++++- .../model/create_ue_context_201_response.c | 4 + .../model/create_ue_context_403_response.c | 4 + .../openapi/model/create_ue_context_request.c | 4 + lib/sbi/openapi/model/data_change_notify.c | 7 +- lib/sbi/openapi/model/data_filter.c | 6 +- .../model/data_restoration_notification.c | 7 +- .../model/datalink_reporting_configuration.c | 5 +- .../datalink_reporting_configuration_1.c | 5 +- lib/sbi/openapi/model/dccf_cond.c | 2 - lib/sbi/openapi/model/dccf_info.c | 2 - lib/sbi/openapi/model/ddn_failure_sub_info.c | 1 - lib/sbi/openapi/model/ddn_failure_subs.c | 1 - .../openapi/model/default_unrelated_class.c | 5 +- lib/sbi/openapi/model/dispersion_area.c | 3 - lib/sbi/openapi/model/dispersion_collection.c | 13 ++- lib/sbi/openapi/model/dispersion_info.c | 5 +- .../openapi/model/dispersion_requirement.c | 14 ++- lib/sbi/openapi/model/dn_perf.c | 20 ++++ lib/sbi/openapi/model/dn_perf_info.c | 5 +- lib/sbi/openapi/model/dn_performance_req.c | 9 +- lib/sbi/openapi/model/dnf.c | 1 - lib/sbi/openapi/model/dnf_unit.c | 1 - lib/sbi/openapi/model/dnn_configuration.c | 49 +++++++- lib/sbi/openapi/model/dnn_configuration_1.c | 49 +++++++- lib/sbi/openapi/model/dnn_smf_info_item.c | 1 - .../openapi/model/dnn_snssai_information.c | 4 + lib/sbi/openapi/model/dnn_upf_info_item.c | 4 - lib/sbi/openapi/model/eap_session.c | 1 - .../openapi/model/eas_ip_replacement_info.c | 8 ++ lib/sbi/openapi/model/eas_server_address.c | 4 + lib/sbi/openapi/model/easdf_info.c | 3 - lib/sbi/openapi/model/ebi_arp_mapping.c | 4 + lib/sbi/openapi/model/ec_restriction.c | 1 - lib/sbi/openapi/model/ec_restriction_1.c | 1 - lib/sbi/openapi/model/ecgi.c | 4 + lib/sbi/openapi/model/ecgi_1.c | 4 + lib/sbi/openapi/model/ecs_addr_config_info.c | 8 ++ .../openapi/model/ecs_addr_config_info_1.c | 8 ++ lib/sbi/openapi/model/ecs_server_addr.c | 1 - lib/sbi/openapi/model/ee_group_profile_data.c | 1 - lib/sbi/openapi/model/ee_profile_data.c | 1 - lib/sbi/openapi/model/ee_subscription.c | 8 ++ lib/sbi/openapi/model/ee_subscription_1.c | 8 ++ lib/sbi/openapi/model/ee_subscription_ext.c | 17 ++- lib/sbi/openapi/model/ellipsoid_arc.c | 8 ++ lib/sbi/openapi/model/ellipsoid_arc_all_of.c | 4 + lib/sbi/openapi/model/emergency_info.c | 8 ++ .../enhanced_coverage_restriction_data.c | 1 - lib/sbi/openapi/model/eps_iwk_pgw.c | 4 + lib/sbi/openapi/model/error_report.c | 7 +- lib/sbi/openapi/model/eutra_location.c | 16 +++ lib/sbi/openapi/model/event_notification.c | 30 ++--- .../model/event_reporting_requirement.c | 10 +- lib/sbi/openapi/model/event_subscription.c | 56 ++++++--- lib/sbi/openapi/model/events_notification.c | 46 ++++++-- lib/sbi/openapi/model/events_subsc_put_data.c | 55 +++++++-- lib/sbi/openapi/model/events_subsc_req_data.c | 9 +- .../openapi/model/events_subsc_req_data_rm.c | 9 +- lib/sbi/openapi/model/exception.c | 8 ++ lib/sbi/openapi/model/expected_ue_behavior.c | 1 - lib/sbi/openapi/model/expected_ue_behaviour.c | 21 +++- .../model/expected_ue_behaviour_data.c | 9 +- .../model/expected_ue_behaviour_data_1.c | 9 +- .../model/exposure_data_change_notification.c | 5 +- .../model/ext_amf_event_subscription.c | 5 +- lib/sbi/openapi/model/ext_problem_details.c | 9 +- lib/sbi/openapi/model/ext_snssai.c | 1 - .../openapi/model/extended_problem_details.c | 13 ++- .../model/extended_problem_details_all_of.c | 4 + lib/sbi/openapi/model/extended_sm_subs_data.c | 1 - .../openapi/model/external_unrelated_class.c | 3 - lib/sbi/openapi/model/failure_event_info.c | 8 ++ lib/sbi/openapi/model/flow_information.c | 4 + lib/sbi/openapi/model/gad_shape.c | 4 + .../model/gba_authentication_info_request.c | 4 + .../model/gba_authentication_info_result.c | 4 + .../openapi/model/gbr_qos_flow_information.c | 1 - lib/sbi/openapi/model/geo_service_area.c | 2 - lib/sbi/openapi/model/geo_service_area_1.c | 2 - lib/sbi/openapi/model/geographic_area.c | 13 ++- lib/sbi/openapi/model/geographical_area.c | 8 ++ lib/sbi/openapi/model/gera_location.c | 16 +++ lib/sbi/openapi/model/global_ran_node_id.c | 8 ++ lib/sbi/openapi/model/global_ran_node_id_1.c | 8 ++ lib/sbi/openapi/model/gmlc_info.c | 1 - lib/sbi/openapi/model/group_identifiers.c | 1 - lib/sbi/openapi/model/guami.c | 4 + lib/sbi/openapi/model/guami_list_cond.c | 1 - lib/sbi/openapi/model/hsmf_update_data.c | 86 +++++++++++++- lib/sbi/openapi/model/hsmf_update_error.c | 8 ++ lib/sbi/openapi/model/hsmf_updated_data.c | 34 +++++- .../model/hss_authentication_info_request.c | 8 ++ .../model/hss_authentication_info_result.c | 4 + lib/sbi/openapi/model/hss_info.c | 9 +- lib/sbi/openapi/model/hss_subscription_info.c | 1 - lib/sbi/openapi/model/hss_subscription_item.c | 4 + lib/sbi/openapi/model/immediate_mdt_conf.c | 5 +- lib/sbi/openapi/model/immediate_report.c | 64 +++++++++++ .../openapi/model/ip_eth_flow_description.c | 4 + lib/sbi/openapi/model/ip_sm_gw_info.c | 8 ++ lib/sbi/openapi/model/ip_sm_gw_registration.c | 4 + lib/sbi/openapi/model/iptv_config_data.c | 4 + lib/sbi/openapi/model/iwmsc_info.c | 3 - lib/sbi/openapi/model/lcs_client_external.c | 5 +- .../openapi/model/lcs_client_group_external.c | 5 +- lib/sbi/openapi/model/lcs_mo_data.c | 4 + lib/sbi/openapi/model/lcs_privacy.c | 4 + lib/sbi/openapi/model/lcs_privacy_data.c | 9 +- lib/sbi/openapi/model/lmf_info.c | 4 - .../model/local2d_point_uncertainty_ellipse.c | 16 +++ ...local2d_point_uncertainty_ellipse_all_of.c | 12 ++ .../local3d_point_uncertainty_ellipsoid.c | 16 +++ ...cal3d_point_uncertainty_ellipsoid_all_of.c | 12 ++ lib/sbi/openapi/model/local_origin.c | 4 + lib/sbi/openapi/model/location_area.c | 10 +- lib/sbi/openapi/model/location_area_1.c | 10 +- lib/sbi/openapi/model/location_area_id.c | 4 + lib/sbi/openapi/model/location_info.c | 4 + .../model/location_reporting_configuration.c | 8 ++ .../location_reporting_configuration_1.c | 8 ++ lib/sbi/openapi/model/lpi.c | 4 + lib/sbi/openapi/model/mapping_of_snssai.c | 8 ++ lib/sbi/openapi/model/mb_smf_info.c | 2 - lib/sbi/openapi/model/mb_upf_info.c | 4 - lib/sbi/openapi/model/mbs_binding_resp.c | 1 - .../openapi/model/mbs_ext_problem_details.c | 10 +- lib/sbi/openapi/model/mbs_service_area.c | 2 - lib/sbi/openapi/model/mbs_service_area_info.c | 4 + lib/sbi/openapi/model/mbs_session.c | 4 + lib/sbi/openapi/model/mbs_session_id.c | 8 ++ lib/sbi/openapi/model/mbs_session_id_1.c | 8 ++ lib/sbi/openapi/model/mbs_subscription_data.c | 1 - .../openapi/model/mbs_subscription_data_1.c | 1 - lib/sbi/openapi/model/mdt_configuration.c | 7 +- lib/sbi/openapi/model/mdt_configuration_1.c | 7 +- lib/sbi/openapi/model/media_component.c | 17 ++- lib/sbi/openapi/model/media_component_rm.c | 25 ++++- lib/sbi/openapi/model/media_sub_component.c | 1 - .../openapi/model/media_sub_component_rm.c | 1 - lib/sbi/openapi/model/message_waiting_data.c | 1 - lib/sbi/openapi/model/mfaf_info.c | 2 - lib/sbi/openapi/model/ml_analytics_info.c | 3 - lib/sbi/openapi/model/mm_context.c | 33 +++++- lib/sbi/openapi/model/mnpf_info.c | 1 - lib/sbi/openapi/model/model_5_g_ddnmf_info.c | 4 + .../model/model_5_gvn_group_configuration.c | 4 + .../openapi/model/model_5_gvn_group_data.c | 10 +- .../model/model_5_mbs_authorization_info.c | 1 - .../openapi/model/modification_notification.c | 1 - lib/sbi/openapi/model/modify_200_response.c | 17 ++- ...scription_data_subscription_200_response.c | 9 +- .../openapi/model/monitoring_configuration.c | 36 ++++++ .../model/monitoring_configuration_1.c | 36 ++++++ .../openapi/model/multicast_access_control.c | 4 + lib/sbi/openapi/model/n1_message_container.c | 4 + .../openapi/model/n1_message_notification.c | 20 ++++ .../model/n1_n2_message_transfer_error.c | 8 ++ .../model/n1_n2_message_transfer_req_data.c | 24 ++++ .../openapi/model/n1_n2_msg_txfr_err_detail.c | 4 + lib/sbi/openapi/model/n2_info_container.c | 24 ++++ lib/sbi/openapi/model/n2_info_content.c | 4 + .../model/n2_info_notification_rsp_data.c | 1 - ...fo_notify_handover_complete_200_response.c | 4 + .../openapi/model/n2_info_notify_request.c | 4 + .../model/n2_information_notification.c | 13 ++- .../model/n2_information_transfer_error.c | 8 ++ .../model/n2_information_transfer_req_data.c | 6 +- .../model/n2_information_transfer_rsp_data.c | 4 + lib/sbi/openapi/model/n2_ran_information.c | 4 + lib/sbi/openapi/model/n2_sm_information.c | 16 +++ lib/sbi/openapi/model/n32f_error_info.c | 2 - lib/sbi/openapi/model/n3ga_location.c | 16 +++ lib/sbi/openapi/model/n4_information.c | 8 ++ .../openapi/model/namf_subscription_data.c | 1 - lib/sbi/openapi/model/ncgi.c | 4 + lib/sbi/openapi/model/ncgi_1.c | 4 + lib/sbi/openapi/model/ncgi_tai.c | 5 +- lib/sbi/openapi/model/nef_cond.c | 7 +- lib/sbi/openapi/model/nef_info.c | 13 ++- lib/sbi/openapi/model/network_area_info.c | 4 - lib/sbi/openapi/model/network_area_info_1.c | 4 - lib/sbi/openapi/model/network_area_info_2.c | 4 - lib/sbi/openapi/model/network_perf_info.c | 8 ++ .../openapi/model/network_perf_requirement.c | 4 + lib/sbi/openapi/model/network_slice_cond.c | 1 - lib/sbi/openapi/model/nf_instance_info.c | 4 + .../openapi/model/nf_load_level_information.c | 8 ++ lib/sbi/openapi/model/nf_profile.c | 106 ++++++++++++++++-- lib/sbi/openapi/model/nf_service.c | 12 +- lib/sbi/openapi/model/ng_ran_target_id.c | 8 ++ .../openapi/model/nidd_authorization_info.c | 1 - .../model/nnwdaf_events_subscription.c | 15 ++- lib/sbi/openapi/model/no_profile_match_info.c | 5 +- .../model/non_ue_n2_info_notify_request.c | 4 + .../non_ue_n2_info_subscription_create_data.c | 1 - .../non_ue_n2_message_transfer_request.c | 4 + lib/sbi/openapi/model/notification_data.c | 9 +- lib/sbi/openapi/model/notification_item.c | 1 - lib/sbi/openapi/model/notify_item.c | 1 - lib/sbi/openapi/model/nr_location.c | 12 ++ .../model/nrf_info_served_amf_info_value.c | 9 +- .../model/nrf_info_served_ausf_info_value.c | 2 - .../model/nrf_info_served_bsf_info_value.c | 4 - .../model/nrf_info_served_chf_info_value.c | 3 - .../model/nrf_info_served_gmlc_info_value.c | 1 - ...rf_info_served_hss_info_list_value_value.c | 9 +- .../model/nrf_info_served_lmf_info_value.c | 4 - ...info_served_mb_smf_info_list_value_value.c | 2 - .../model/nrf_info_served_nef_info_value.c | 13 ++- .../model/nrf_info_served_nwdaf_info_value.c | 9 +- .../model/nrf_info_served_pcf_info_value.c | 10 +- ..._info_served_pcscf_info_list_value_value.c | 2 - .../nrf_info_served_scp_info_list_value.c | 4 - .../nrf_info_served_sepp_info_list_value.c | 2 - .../model/nrf_info_served_smf_info_value.c | 4 - .../model/nrf_info_served_udm_info_value.c | 5 - .../model/nrf_info_served_udr_info_value.c | 4 - .../model/nrf_info_served_udsf_info_value.c | 1 - .../model/nrf_info_served_upf_info_value.c | 20 +++- lib/sbi/openapi/model/nrppa_information.c | 4 + lib/sbi/openapi/model/nsacf_info.c | 6 +- lib/sbi/openapi/model/nsag_info.c | 3 - lib/sbi/openapi/model/nsi_id_info.c | 4 + lib/sbi/openapi/model/nsi_load_level_info.c | 25 ++++- lib/sbi/openapi/model/nssaa_status.c | 4 + lib/sbi/openapi/model/nssaaf_info.c | 2 - lib/sbi/openapi/model/nssai.c | 2 - lib/sbi/openapi/model/nssai_1.c | 2 - lib/sbi/openapi/model/nssai_mapping.c | 8 ++ lib/sbi/openapi/model/nudm_amf_info.c | 4 + lib/sbi/openapi/model/nwdaf_cond.c | 4 - lib/sbi/openapi/model/nwdaf_data.c | 1 - lib/sbi/openapi/model/nwdaf_info.c | 9 +- lib/sbi/openapi/model/nwdaf_registration.c | 5 +- .../openapi/model/nwdaf_registration_info.c | 1 - .../model/nwdaf_registration_modification.c | 1 - lib/sbi/openapi/model/nwdaf_subscription.c | 4 + .../model/operator_specific_data_container.c | 4 + .../openapi/model/out_of_credit_information.c | 5 +- lib/sbi/openapi/model/parameter_combination.c | 4 + .../openapi/model/partial_success_report.c | 7 +- lib/sbi/openapi/model/patch_result.c | 1 - lib/sbi/openapi/model/pc5_qo_s_para.c | 1 - lib/sbi/openapi/model/pc5_qos_flow_item.c | 4 + lib/sbi/openapi/model/pcc_rule.c | 17 ++- lib/sbi/openapi/model/pcf_addressing_info.c | 1 - lib/sbi/openapi/model/pcf_binding.c | 10 +- lib/sbi/openapi/model/pcf_binding_patch.c | 1 - .../openapi/model/pcf_for_pdu_session_info.c | 5 +- lib/sbi/openapi/model/pcf_for_ue_binding.c | 1 - .../openapi/model/pcf_for_ue_binding_patch.c | 1 - lib/sbi/openapi/model/pcf_for_ue_info.c | 1 - lib/sbi/openapi/model/pcf_info.c | 10 +- lib/sbi/openapi/model/pcf_mbs_binding.c | 5 +- lib/sbi/openapi/model/pcf_mbs_binding_patch.c | 1 - .../model/pcf_selection_assistance_info.c | 4 + .../model/pcf_selection_assistance_info_1.c | 4 + lib/sbi/openapi/model/pcscf_info.c | 2 - .../model/pcscf_restoration_notification.c | 4 + .../model/pcscf_restoration_request_data.c | 4 + lib/sbi/openapi/model/pdu_session.c | 8 ++ lib/sbi/openapi/model/pdu_session_context.c | 21 +++- .../openapi/model/pdu_session_create_data.c | 77 ++++++++++++- .../openapi/model/pdu_session_create_error.c | 8 ++ .../openapi/model/pdu_session_created_data.c | 46 +++++++- .../model/pdu_session_event_notification.c | 12 ++ lib/sbi/openapi/model/pdu_session_info.c | 4 + .../model/pdu_session_management_data.c | 1 - .../openapi/model/pdu_session_tsn_bridge.c | 17 ++- .../openapi/model/pfd_change_notification.c | 1 - lib/sbi/openapi/model/pfd_content.c | 4 + lib/sbi/openapi/model/pfd_data_for_app_ext.c | 1 - lib/sbi/openapi/model/pgw_info.c | 8 ++ lib/sbi/openapi/model/plmn_ec_info.c | 8 ++ lib/sbi/openapi/model/plmn_ec_info_1.c | 8 ++ lib/sbi/openapi/model/plmn_oauth2.c | 2 - lib/sbi/openapi/model/plmn_restriction.c | 5 +- lib/sbi/openapi/model/plmn_restriction_1.c | 5 +- .../model/plmn_route_selection_descriptor.c | 5 +- lib/sbi/openapi/model/plmn_snssai.c | 5 +- lib/sbi/openapi/model/point.c | 8 ++ lib/sbi/openapi/model/point_all_of.c | 4 + lib/sbi/openapi/model/point_altitude.c | 8 ++ lib/sbi/openapi/model/point_altitude_all_of.c | 4 + .../model/point_altitude_uncertainty.c | 12 ++ .../model/point_altitude_uncertainty_all_of.c | 8 ++ .../openapi/model/point_uncertainty_circle.c | 8 ++ .../model/point_uncertainty_circle_all_of.c | 4 + .../openapi/model/point_uncertainty_ellipse.c | 12 ++ .../model/point_uncertainty_ellipse_all_of.c | 8 ++ lib/sbi/openapi/model/policy_association.c | 30 ++++- .../model/policy_association_request.c | 34 +++++- .../model/policy_association_update_request.c | 34 +++++- .../model/policy_data_change_notification.c | 45 +++++++- .../model/policy_data_for_individual_ue.c | 12 ++ .../openapi/model/policy_data_subscription.c | 2 - lib/sbi/openapi/model/policy_update.c | 26 ++++- lib/sbi/openapi/model/polygon.c | 5 +- lib/sbi/openapi/model/polygon_all_of.c | 1 - lib/sbi/openapi/model/pp_data.c | 28 +++++ lib/sbi/openapi/model/pp_data_entry.c | 13 ++- lib/sbi/openapi/model/pp_data_entry_list.c | 1 - .../openapi/model/pp_dl_packet_count_ext.c | 4 + lib/sbi/openapi/model/presence_info.c | 5 - lib/sbi/openapi/model/presence_info_rm.c | 5 - lib/sbi/openapi/model/prev_sub_info.c | 2 - lib/sbi/openapi/model/pro_se_allowed_plmn.c | 4 + .../openapi/model/pro_se_authentication_ctx.c | 4 + .../pro_se_authentication_info_request.c | 4 + .../model/pro_se_authentication_info_result.c | 4 + lib/sbi/openapi/model/pro_se_information.c | 4 + lib/sbi/openapi/model/problem_details.c | 9 +- lib/sbi/openapi/model/problem_details_1.c | 9 +- lib/sbi/openapi/model/prose_context.c | 4 + .../openapi/model/prose_subscription_data.c | 5 +- lib/sbi/openapi/model/protection_policy.c | 1 - lib/sbi/openapi/model/provisioned_data_sets.c | 64 +++++++++++ lib/sbi/openapi/model/pws_information.c | 5 +- lib/sbi/openapi/model/pws_response_data.c | 1 - lib/sbi/openapi/model/qos_data.c | 4 + .../model/qos_flow_add_modify_request_item.c | 4 + lib/sbi/openapi/model/qos_flow_item.c | 4 + lib/sbi/openapi/model/qos_flow_profile.c | 16 +++ lib/sbi/openapi/model/qos_flow_setup_item.c | 4 + lib/sbi/openapi/model/qos_flow_tunnel.c | 4 + lib/sbi/openapi/model/qos_monitoring_report.c | 1 - .../model/qos_notification_control_info.c | 1 - .../openapi/model/qos_sustainability_info.c | 12 ++ .../openapi/model/query_param_combination.c | 1 - lib/sbi/openapi/model/ran_nas_rel_cause.c | 4 + lib/sbi/openapi/model/rat_freq_information.c | 8 ++ .../reachability_for_data_configuration.c | 4 + .../reachability_for_data_configuration_1.c | 4 + .../model/redundant_transmission_exp_info.c | 5 +- .../model/redundant_transmission_exp_per_ts.c | 4 + .../model/redundant_transmission_exp_req.c | 8 ++ .../model/registration_context_container.c | 35 +++++- .../openapi/model/registration_data_sets.c | 28 +++++ .../model/registration_location_info.c | 12 ++ lib/sbi/openapi/model/release_data.c | 26 ++++- .../model/release_pdu_session_200_response.c | 4 + .../model/release_pdu_session_request.c | 4 + .../model/release_sm_context_request.c | 4 + lib/sbi/openapi/model/released_data.c | 20 ++++ .../model/relocate_ue_context_request.c | 4 + lib/sbi/openapi/model/reporting_information.c | 4 + lib/sbi/openapi/model/reporting_options.c | 4 + lib/sbi/openapi/model/reporting_options_1.c | 4 + .../openapi/model/resources_allocation_info.c | 1 - .../openapi/model/retainability_threshold.c | 4 + lib/sbi/openapi/model/retrieved_data.c | 8 ++ lib/sbi/openapi/model/rm_info.c | 4 + .../openapi/model/roaming_charging_profile.c | 5 +- lib/sbi/openapi/model/roaming_info_update.c | 4 + .../model/route_selection_parameter_set.c | 6 +- lib/sbi/openapi/model/route_to_location.c | 4 + lib/sbi/openapi/model/routing_area_id.c | 4 + .../openapi/model/routing_info_sm_response.c | 16 +++ lib/sbi/openapi/model/rule_report.c | 5 +- lib/sbi/openapi/model/scp_domain_info.c | 1 - .../scp_domain_routing_info_notification.c | 4 + lib/sbi/openapi/model/scp_info.c | 4 - lib/sbi/openapi/model/sdm_subscription.c | 20 ++++ lib/sbi/openapi/model/sdm_subscription_1.c | 20 ++++ lib/sbi/openapi/model/seaf_data.c | 8 ++ lib/sbi/openapi/model/search_result.c | 9 +- .../openapi/model/sec_negotiate_req_data.c | 11 +- .../openapi/model/sec_negotiate_rsp_data.c | 4 - .../openapi/model/sec_param_exch_req_data.c | 5 +- .../openapi/model/sec_param_exch_rsp_data.c | 5 +- .../openapi/model/secondary_rat_usage_info.c | 2 - .../model/secondary_rat_usage_report.c | 1 - lib/sbi/openapi/model/send_mo_data_req_data.c | 12 ++ lib/sbi/openapi/model/send_mo_data_request.c | 4 + lib/sbi/openapi/model/sepp_info.c | 2 - .../model/service_area_coverage_info.c | 4 + lib/sbi/openapi/model/service_area_id.c | 4 + .../openapi/model/service_area_restriction.c | 1 - .../model/service_area_restriction_1.c | 1 - .../openapi/model/service_experience_info.c | 29 ++++- .../openapi/model/service_parameter_data.c | 6 +- .../model/service_parameter_data_patch.c | 2 - .../service_specific_authorization_info.c | 1 - .../model/service_type_unrelated_class.c | 5 +- lib/sbi/openapi/model/serving_nf_identity.c | 12 ++ .../session_management_subscription_data.c | 8 ++ .../session_management_subscription_data_1.c | 8 ++ lib/sbi/openapi/model/session_rule.c | 8 ++ lib/sbi/openapi/model/shared_data.c | 24 ++++ .../model/slice_info_for_pdu_session.c | 8 ++ .../model/slice_info_for_registration.c | 12 +- .../slice_info_for_ue_configuration_update.c | 12 +- .../model/slice_load_level_information.c | 1 - lib/sbi/openapi/model/sm_context.c | 52 ++++++++- .../openapi/model/sm_context_create_data.c | 78 ++++++++++++- .../openapi/model/sm_context_create_error.c | 12 ++ .../openapi/model/sm_context_created_data.c | 9 +- .../openapi/model/sm_context_release_data.c | 16 +++ .../openapi/model/sm_context_released_data.c | 8 ++ .../openapi/model/sm_context_retrieve_data.c | 8 ++ .../openapi/model/sm_context_retrieved_data.c | 16 +++ .../model/sm_context_status_notification.c | 16 +++ .../openapi/model/sm_context_update_data.c | 71 +++++++++++- .../openapi/model/sm_context_update_error.c | 12 ++ .../openapi/model/sm_context_updated_data.c | 20 +++- .../openapi/model/sm_policy_context_data.c | 50 ++++++++- lib/sbi/openapi/model/sm_policy_control.c | 8 ++ lib/sbi/openapi/model/sm_policy_decision.c | 18 ++- lib/sbi/openapi/model/sm_policy_delete_data.c | 11 +- lib/sbi/openapi/model/sm_policy_dnn_data.c | 4 + .../openapi/model/sm_policy_notification.c | 4 + lib/sbi/openapi/model/sm_policy_snssai_data.c | 8 ++ .../model/sm_policy_snssai_data_patch.c | 4 + .../model/sm_policy_update_context_data.c | 68 +++++++++-- lib/sbi/openapi/model/sm_subs_data.c | 1 - .../model/small_data_rate_status_info.c | 8 ++ lib/sbi/openapi/model/smcce_info.c | 8 ++ lib/sbi/openapi/model/smf_info.c | 4 - lib/sbi/openapi/model/smf_registration.c | 16 +++ lib/sbi/openapi/model/smf_registration_info.c | 1 - .../model/smf_registration_modification.c | 4 + lib/sbi/openapi/model/smf_selection_data.c | 8 ++ lib/sbi/openapi/model/smf_subscription_info.c | 1 - lib/sbi/openapi/model/smf_subscription_item.c | 4 + .../model/sms_management_subscription_data.c | 4 + .../sms_management_subscription_data_1.c | 4 + lib/sbi/openapi/model/sms_router_info.c | 4 + lib/sbi/openapi/model/smsc_data.c | 4 + lib/sbi/openapi/model/smsf_info.c | 4 + lib/sbi/openapi/model/smsf_registration.c | 12 ++ lib/sbi/openapi/model/snssai_dnn_pair.c | 4 + .../openapi/model/snssai_easdf_info_item.c | 5 +- lib/sbi/openapi/model/snssai_extension.c | 1 - lib/sbi/openapi/model/snssai_info.c | 1 - lib/sbi/openapi/model/snssai_info_item.c | 5 +- .../openapi/model/snssai_mb_smf_info_item.c | 5 +- .../model/snssai_route_selection_descriptor.c | 5 +- lib/sbi/openapi/model/snssai_smf_info_item.c | 5 +- .../openapi/model/snssai_tsctsf_info_item.c | 5 +- lib/sbi/openapi/model/snssai_upf_info_item.c | 5 +- lib/sbi/openapi/model/sor_info.c | 4 + lib/sbi/openapi/model/sor_info_1.c | 4 + lib/sbi/openapi/model/sor_update_info.c | 4 + lib/sbi/openapi/model/spatial_validity_cond.c | 5 +- .../openapi/model/spatial_validity_cond_1.c | 5 +- lib/sbi/openapi/model/ssm.c | 8 ++ lib/sbi/openapi/model/ssm_1.c | 8 ++ lib/sbi/openapi/model/status_info.c | 4 + lib/sbi/openapi/model/status_notification.c | 20 ++++ lib/sbi/openapi/model/steering_info.c | 5 +- lib/sbi/openapi/model/steering_mode.c | 8 ++ lib/sbi/openapi/model/stored_search_result.c | 1 - lib/sbi/openapi/model/subscr_cond.c | 3 - .../openapi/model/subscribed_default_qos.c | 4 + .../openapi/model/subscribed_default_qos_1.c | 4 + lib/sbi/openapi/model/subscribed_snssai.c | 4 + lib/sbi/openapi/model/subscription_context.c | 4 + lib/sbi/openapi/model/subscription_data.c | 16 ++- .../openapi/model/subscription_data_sets.c | 64 +++++++++++ .../model/subscription_data_subscriptions.c | 8 ++ lib/sbi/openapi/model/tai.c | 4 + lib/sbi/openapi/model/tai_1.c | 4 + lib/sbi/openapi/model/tai_range.c | 5 +- lib/sbi/openapi/model/target_area.c | 2 - lib/sbi/openapi/model/time_period.c | 4 + lib/sbi/openapi/model/tmgi.c | 4 + lib/sbi/openapi/model/tmgi_1.c | 4 + lib/sbi/openapi/model/tmgi_range.c | 4 + lib/sbi/openapi/model/top_application.c | 4 + lib/sbi/openapi/model/trace_data_response.c | 4 + .../openapi/model/traffic_characterization.c | 5 +- lib/sbi/openapi/model/traffic_control_data.c | 19 +++- lib/sbi/openapi/model/traffic_descriptor.c | 5 +- .../model/traffic_descriptor_components.c | 2 - lib/sbi/openapi/model/traffic_influ_data.c | 13 ++- .../openapi/model/traffic_influ_data_notif.c | 4 + .../openapi/model/traffic_influ_data_patch.c | 8 +- lib/sbi/openapi/model/traffic_influ_sub.c | 1 - .../openapi/model/transfer_mo_data_req_data.c | 12 ++ .../openapi/model/transfer_mo_data_request.c | 4 + .../openapi/model/transfer_mt_data_error.c | 9 +- .../model/transfer_mt_data_ismf_request.c | 4 + .../openapi/model/transfer_mt_data_req_data.c | 4 + lib/sbi/openapi/model/transfer_policy.c | 4 + lib/sbi/openapi/model/trigger.c | 8 ++ lib/sbi/openapi/model/trigger_request.c | 4 + lib/sbi/openapi/model/trust_af_info.c | 1 - lib/sbi/openapi/model/tsctsf_info.c | 4 - lib/sbi/openapi/model/udm_info.c | 5 - lib/sbi/openapi/model/udr_info.c | 4 - lib/sbi/openapi/model/udsf_info.c | 1 - .../model/ue_analytics_context_descriptor.c | 1 - lib/sbi/openapi/model/ue_authentication_ctx.c | 4 + lib/sbi/openapi/model/ue_camping_rep.c | 12 ++ lib/sbi/openapi/model/ue_communication.c | 16 +++ lib/sbi/openapi/model/ue_context.c | 71 ++++++++++-- .../model/ue_context_cancel_relocate_data.c | 4 + .../openapi/model/ue_context_create_data.c | 29 ++++- .../openapi/model/ue_context_create_error.c | 12 ++ .../openapi/model/ue_context_created_data.c | 10 +- .../openapi/model/ue_context_in_amf_data.c | 5 +- .../openapi/model/ue_context_in_smf_data.c | 5 +- .../model/ue_context_in_smf_data_sub_filter.c | 1 - .../ue_context_in_smf_data_sub_filter_1.c | 1 - .../openapi/model/ue_context_in_smsf_data.c | 8 ++ lib/sbi/openapi/model/ue_context_release.c | 4 + .../openapi/model/ue_context_relocate_data.c | 25 ++++- .../openapi/model/ue_context_relocated_data.c | 4 + .../model/ue_context_transfer_200_response.c | 4 + .../model/ue_context_transfer_req_data.c | 8 ++ .../model/ue_context_transfer_request.c | 4 + .../model/ue_context_transfer_rsp_data.c | 16 +++ .../openapi/model/ue_differentiation_info.c | 8 ++ lib/sbi/openapi/model/ue_in_area_filter.c | 4 + .../model/ue_initiated_resource_request.c | 5 +- lib/sbi/openapi/model/ue_mobility.c | 5 +- .../ue_n1_n2_info_subscription_create_data.c | 4 + .../model/ue_reg_status_update_req_data.c | 2 - lib/sbi/openapi/model/ue_slice_mbr.c | 8 ++ lib/sbi/openapi/model/un_trust_af_info.c | 1 - lib/sbi/openapi/model/unrelated_class.c | 9 +- lib/sbi/openapi/model/up_security_info.c | 8 ++ .../update_nwdaf_registration_200_response.c | 6 +- .../model/update_pdu_session_200_response.c | 4 + .../model/update_pdu_session_400_response.c | 4 + .../model/update_pdu_session_request.c | 4 + .../model/update_sm_context_200_response.c | 4 + .../model/update_sm_context_400_response.c | 4 + .../openapi/model/update_sm_context_request.c | 4 + lib/sbi/openapi/model/upf_cond.c | 1 - lib/sbi/openapi/model/upf_info.c | 20 +++- lib/sbi/openapi/model/upf_information.c | 4 + lib/sbi/openapi/model/upu_data.c | 1 - lib/sbi/openapi/model/upu_data_1.c | 1 - lib/sbi/openapi/model/upu_data_2.c | 1 - lib/sbi/openapi/model/upu_info.c | 1 - lib/sbi/openapi/model/upu_info_1.c | 1 - lib/sbi/openapi/model/ursp_rule_request.c | 5 +- lib/sbi/openapi/model/usage_mon_data.c | 8 ++ lib/sbi/openapi/model/usage_mon_data_limit.c | 12 ++ lib/sbi/openapi/model/usage_mon_data_scope.c | 4 + .../openapi/model/user_data_congestion_info.c | 12 ++ lib/sbi/openapi/model/user_location.c | 20 ++++ lib/sbi/openapi/model/utra_location.c | 16 +++ lib/sbi/openapi/model/v2x_context.c | 12 ++ lib/sbi/openapi/model/v2x_information.c | 4 + lib/sbi/openapi/model/v2x_subscription_data.c | 8 ++ lib/sbi/openapi/model/vn_group_data.c | 9 +- lib/sbi/openapi/model/vplmn_qos.c | 8 ++ lib/sbi/openapi/model/vsmf_update_data.c | 41 ++++++- lib/sbi/openapi/model/vsmf_update_error.c | 33 +++++- lib/sbi/openapi/model/vsmf_updated_data.c | 40 +++++-- .../model/wireline_service_area_restriction.c | 1 - .../wireline_service_area_restriction_1.c | 1 - .../model/wlan_per_ss_id_performance_info.c | 1 - .../model/wlan_per_ts_performance_info.c | 4 + lib/sbi/openapi/model/wlan_performance_info.c | 5 +- lib/sbi/openapi/model/wlan_performance_req.c | 8 ++ .../templates/model-body.mustache | 5 +- 646 files changed, 4920 insertions(+), 735 deletions(-) diff --git a/lib/sbi/openapi/model/_application_data_influence_data_subs_to_notify_post_request_inner.c b/lib/sbi/openapi/model/_application_data_influence_data_subs_to_notify_post_request_inner.c index a4a26ed07..4ee8420f0 100644 --- a/lib/sbi/openapi/model/_application_data_influence_data_subs_to_notify_post_request_inner.c +++ b/lib/sbi/openapi/model/_application_data_influence_data_subs_to_notify_post_request_inner.c @@ -93,6 +93,10 @@ OpenAPI__application_data_influence_data_subs_to_notify_post_request_inner_t *Op traffic_influ_data = cJSON_GetObjectItemCaseSensitive(_application_data_influence_data_subs_to_notify_post_request_innerJSON, "trafficInfluData"); if (traffic_influ_data) { traffic_influ_data_local_nonprim = OpenAPI_traffic_influ_data_parseFromJSON(traffic_influ_data); + if (!traffic_influ_data_local_nonprim) { + ogs_error("OpenAPI_traffic_influ_data_parseFromJSON failed [traffic_influ_data]"); + goto end; + } } _application_data_influence_data_subs_to_notify_post_request_inner_local_var = OpenAPI__application_data_influence_data_subs_to_notify_post_request_inner_create ( diff --git a/lib/sbi/openapi/model/abnormal_behaviour.c b/lib/sbi/openapi/model/abnormal_behaviour.c index e42eabc91..7837b2737 100644 --- a/lib/sbi/openapi/model/abnormal_behaviour.c +++ b/lib/sbi/openapi/model/abnormal_behaviour.c @@ -198,6 +198,10 @@ OpenAPI_abnormal_behaviour_t *OpenAPI_abnormal_behaviour_parseFromJSON(cJSON *ab goto end; } excep_local_nonprim = OpenAPI_exception_parseFromJSON(excep); + if (!excep_local_nonprim) { + ogs_error("OpenAPI_exception_parseFromJSON failed [excep]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(abnormal_behaviourJSON, "dnn"); if (dnn) { @@ -210,6 +214,10 @@ OpenAPI_abnormal_behaviour_t *OpenAPI_abnormal_behaviour_parseFromJSON(cJSON *ab snssai = cJSON_GetObjectItemCaseSensitive(abnormal_behaviourJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } ratio = cJSON_GetObjectItemCaseSensitive(abnormal_behaviourJSON, "ratio"); @@ -231,6 +239,10 @@ OpenAPI_abnormal_behaviour_t *OpenAPI_abnormal_behaviour_parseFromJSON(cJSON *ab addt_meas_info = cJSON_GetObjectItemCaseSensitive(abnormal_behaviourJSON, "addtMeasInfo"); if (addt_meas_info) { addt_meas_info_local_nonprim = OpenAPI_additional_measurement_parseFromJSON(addt_meas_info); + if (!addt_meas_info_local_nonprim) { + ogs_error("OpenAPI_additional_measurement_parseFromJSON failed [addt_meas_info]"); + goto end; + } } abnormal_behaviour_local_var = OpenAPI_abnormal_behaviour_create ( diff --git a/lib/sbi/openapi/model/access_and_mobility_data.c b/lib/sbi/openapi/model/access_and_mobility_data.c index abc090e7f..140d30884 100644 --- a/lib/sbi/openapi/model/access_and_mobility_data.c +++ b/lib/sbi/openapi/model/access_and_mobility_data.c @@ -398,6 +398,10 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS location = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "location"); if (location) { location_local_nonprim = OpenAPI_user_location_parseFromJSON(location); + if (!location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [location]"); + goto end; + } } location_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "locationTs"); @@ -451,7 +455,6 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS OpenAPI_rm_info_t *reg_statesItem = OpenAPI_rm_info_parseFromJSON(reg_states_local); if (!reg_statesItem) { ogs_error("No reg_statesItem"); - OpenAPI_list_free(reg_statesList); goto end; } OpenAPI_list_add(reg_statesList, reg_statesItem); @@ -484,7 +487,6 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS OpenAPI_cm_info_t *conn_statesItem = OpenAPI_cm_info_parseFromJSON(conn_states_local); if (!conn_statesItem) { ogs_error("No conn_statesItem"); - OpenAPI_list_free(conn_statesList); goto end; } OpenAPI_list_add(conn_statesList, conn_statesItem); @@ -502,6 +504,10 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS reachability_status = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "reachabilityStatus"); if (reachability_status) { reachability_status_local_nonprim = OpenAPI_ue_reachability_parseFromJSON(reachability_status); + if (!reachability_status_local_nonprim) { + ogs_error("OpenAPI_ue_reachability_parseFromJSON failed [reachability_status]"); + goto end; + } } reachability_status_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "reachabilityStatusTs"); @@ -548,6 +554,10 @@ OpenAPI_access_and_mobility_data_t *OpenAPI_access_and_mobility_data_parseFromJS current_plmn = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "currentPlmn"); if (current_plmn) { current_plmn_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(current_plmn); + if (!current_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [current_plmn]"); + goto end; + } } current_plmn_ts = cJSON_GetObjectItemCaseSensitive(access_and_mobility_dataJSON, "currentPlmnTs"); diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data.c b/lib/sbi/openapi/model/access_and_mobility_subscription_data.c index fcf557887..92f38e1fa 100644 --- a/lib/sbi/openapi/model/access_and_mobility_subscription_data.c +++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data.c @@ -1100,11 +1100,19 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub subscribed_ue_ambr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "subscribedUeAmbr"); if (subscribed_ue_ambr) { subscribed_ue_ambr_local_nonprim = OpenAPI_ambr_rm_parseFromJSON(subscribed_ue_ambr); + if (!subscribed_ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_rm_parseFromJSON failed [subscribed_ue_ambr]"); + goto end; + } } nssai = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "nssai"); if (nssai) { nssai_local_nonprim = OpenAPI_nssai_parseFromJSON(nssai); + if (!nssai_local_nonprim) { + ogs_error("OpenAPI_nssai_parseFromJSON failed [nssai]"); + goto end; + } } rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ratRestrictions"); @@ -1144,7 +1152,6 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub OpenAPI_area_t *forbidden_areasItem = OpenAPI_area_parseFromJSON(forbidden_areas_local); if (!forbidden_areasItem) { ogs_error("No forbidden_areasItem"); - OpenAPI_list_free(forbidden_areasList); goto end; } OpenAPI_list_add(forbidden_areasList, forbidden_areasItem); @@ -1154,6 +1161,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "serviceAreaRestriction"); if (service_area_restriction) { service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(service_area_restriction); + if (!service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [service_area_restriction]"); + goto end; + } } core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "coreNetworkTypeRestrictions"); @@ -1226,6 +1237,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub sor_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorInfo"); if (sor_info) { sor_info_local_nonprim = OpenAPI_sor_info_parseFromJSON(sor_info); + if (!sor_info_local_nonprim) { + ogs_error("OpenAPI_sor_info_parseFromJSON failed [sor_info]"); + goto end; + } } sor_info_expect_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "sorInfoExpectInd"); @@ -1266,6 +1281,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub upu_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "upuInfo"); if (upu_info) { upu_info_local_nonprim = OpenAPI_upu_info_parseFromJSON(upu_info); + if (!upu_info_local_nonprim) { + ogs_error("OpenAPI_upu_info_parseFromJSON failed [upu_info]"); + goto end; + } } routing_indicator = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "routingIndicator"); @@ -1355,16 +1374,28 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub mdt_configuration = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "mdtConfiguration"); if (mdt_configuration) { mdt_configuration_local_nonprim = OpenAPI_mdt_configuration_parseFromJSON(mdt_configuration); + if (!mdt_configuration_local_nonprim) { + ogs_error("OpenAPI_mdt_configuration_parseFromJSON failed [mdt_configuration]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } cag_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "cagData"); if (cag_data) { cag_data_local_nonprim = OpenAPI_cag_data_parseFromJSON(cag_data); + if (!cag_data_local_nonprim) { + ogs_error("OpenAPI_cag_data_parseFromJSON failed [cag_data]"); + goto end; + } } stn_sr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "stnSr"); @@ -1410,6 +1441,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ecRestrictionDataWb"); if (ec_restriction_data_wb) { ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb); + if (!ec_restriction_data_wb_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON failed [ec_restriction_data_wb]"); + goto end; + } } ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "ecRestrictionDataNb"); @@ -1423,6 +1458,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub expected_ue_behaviour_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "expectedUeBehaviourList"); if (expected_ue_behaviour_list) { expected_ue_behaviour_list_local_nonprim = OpenAPI_expected_ue_behaviour_data_parseFromJSON(expected_ue_behaviour_list); + if (!expected_ue_behaviour_list_local_nonprim) { + ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON failed [expected_ue_behaviour_list]"); + goto end; + } } primary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "primaryRatRestrictions"); @@ -1481,7 +1520,6 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub OpenAPI_edrx_parameters_t *edrx_parameters_listItem = OpenAPI_edrx_parameters_parseFromJSON(edrx_parameters_list_local); if (!edrx_parameters_listItem) { ogs_error("No edrx_parameters_listItem"); - OpenAPI_list_free(edrx_parameters_listList); goto end; } OpenAPI_list_add(edrx_parameters_listList, edrx_parameters_listItem); @@ -1506,7 +1544,6 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub OpenAPI_ptw_parameters_t *ptw_parameters_listItem = OpenAPI_ptw_parameters_parseFromJSON(ptw_parameters_list_local); if (!ptw_parameters_listItem) { ogs_error("No ptw_parameters_listItem"); - OpenAPI_list_free(ptw_parameters_listList); goto end; } OpenAPI_list_add(ptw_parameters_listList, ptw_parameters_listItem); @@ -1565,7 +1602,6 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub OpenAPI_wireline_area_t *wireline_forbidden_areasItem = OpenAPI_wireline_area_parseFromJSON(wireline_forbidden_areas_local); if (!wireline_forbidden_areasItem) { ogs_error("No wireline_forbidden_areasItem"); - OpenAPI_list_free(wireline_forbidden_areasList); goto end; } OpenAPI_list_add(wireline_forbidden_areasList, wireline_forbidden_areasItem); @@ -1575,6 +1611,10 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub wireline_service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "wirelineServiceAreaRestriction"); if (wireline_service_area_restriction) { wireline_service_area_restriction_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wireline_service_area_restriction); + if (!wireline_service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_parseFromJSON failed [wireline_service_area_restriction]"); + goto end; + } } pcf_selection_assistance_infos = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "pcfSelectionAssistanceInfos"); @@ -1595,7 +1635,6 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub OpenAPI_pcf_selection_assistance_info_t *pcf_selection_assistance_infosItem = OpenAPI_pcf_selection_assistance_info_parseFromJSON(pcf_selection_assistance_infos_local); if (!pcf_selection_assistance_infosItem) { ogs_error("No pcf_selection_assistance_infosItem"); - OpenAPI_list_free(pcf_selection_assistance_infosList); goto end; } OpenAPI_list_add(pcf_selection_assistance_infosList, pcf_selection_assistance_infosItem); @@ -1605,11 +1644,19 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub aerial_ue_sub_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "aerialUeSubInfo"); if (aerial_ue_sub_info) { aerial_ue_sub_info_local_nonprim = OpenAPI_aerial_ue_subscription_info_parseFromJSON(aerial_ue_sub_info); + if (!aerial_ue_sub_info_local_nonprim) { + ogs_error("OpenAPI_aerial_ue_subscription_info_parseFromJSON failed [aerial_ue_sub_info]"); + goto end; + } } roaming_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "roamingRestrictions"); if (roaming_restrictions) { roaming_restrictions_local_nonprim = OpenAPI_roaming_restrictions_parseFromJSON(roaming_restrictions); + if (!roaming_restrictions_local_nonprim) { + ogs_error("OpenAPI_roaming_restrictions_parseFromJSON failed [roaming_restrictions]"); + goto end; + } } remote_prov_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_dataJSON, "remoteProvInd"); diff --git a/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c index 29917acac..888650f77 100644 --- a/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c +++ b/lib/sbi/openapi/model/access_and_mobility_subscription_data_1.c @@ -1100,11 +1100,19 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s subscribed_ue_ambr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "subscribedUeAmbr"); if (subscribed_ue_ambr) { subscribed_ue_ambr_local_nonprim = OpenAPI_ambr_rm_parseFromJSON(subscribed_ue_ambr); + if (!subscribed_ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_rm_parseFromJSON failed [subscribed_ue_ambr]"); + goto end; + } } nssai = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "nssai"); if (nssai) { nssai_local_nonprim = OpenAPI_nssai_1_parseFromJSON(nssai); + if (!nssai_local_nonprim) { + ogs_error("OpenAPI_nssai_1_parseFromJSON failed [nssai]"); + goto end; + } } rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ratRestrictions"); @@ -1144,7 +1152,6 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s OpenAPI_area_1_t *forbidden_areasItem = OpenAPI_area_1_parseFromJSON(forbidden_areas_local); if (!forbidden_areasItem) { ogs_error("No forbidden_areasItem"); - OpenAPI_list_free(forbidden_areasList); goto end; } OpenAPI_list_add(forbidden_areasList, forbidden_areasItem); @@ -1154,6 +1161,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "serviceAreaRestriction"); if (service_area_restriction) { service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_1_parseFromJSON(service_area_restriction); + if (!service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_1_parseFromJSON failed [service_area_restriction]"); + goto end; + } } core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "coreNetworkTypeRestrictions"); @@ -1226,6 +1237,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s sor_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorInfo"); if (sor_info) { sor_info_local_nonprim = OpenAPI_sor_info_1_parseFromJSON(sor_info); + if (!sor_info_local_nonprim) { + ogs_error("OpenAPI_sor_info_1_parseFromJSON failed [sor_info]"); + goto end; + } } sor_info_expect_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "sorInfoExpectInd"); @@ -1266,6 +1281,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s upu_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "upuInfo"); if (upu_info) { upu_info_local_nonprim = OpenAPI_upu_info_1_parseFromJSON(upu_info); + if (!upu_info_local_nonprim) { + ogs_error("OpenAPI_upu_info_1_parseFromJSON failed [upu_info]"); + goto end; + } } routing_indicator = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "routingIndicator"); @@ -1355,16 +1374,28 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s mdt_configuration = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "mdtConfiguration"); if (mdt_configuration) { mdt_configuration_local_nonprim = OpenAPI_mdt_configuration_1_parseFromJSON(mdt_configuration); + if (!mdt_configuration_local_nonprim) { + ogs_error("OpenAPI_mdt_configuration_1_parseFromJSON failed [mdt_configuration]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } cag_data = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "cagData"); if (cag_data) { cag_data_local_nonprim = OpenAPI_cag_data_1_parseFromJSON(cag_data); + if (!cag_data_local_nonprim) { + ogs_error("OpenAPI_cag_data_1_parseFromJSON failed [cag_data]"); + goto end; + } } stn_sr = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "stnSr"); @@ -1410,6 +1441,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ecRestrictionDataWb"); if (ec_restriction_data_wb) { ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb); + if (!ec_restriction_data_wb_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON failed [ec_restriction_data_wb]"); + goto end; + } } ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "ecRestrictionDataNb"); @@ -1423,6 +1458,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s expected_ue_behaviour_list = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "expectedUeBehaviourList"); if (expected_ue_behaviour_list) { expected_ue_behaviour_list_local_nonprim = OpenAPI_expected_ue_behaviour_data_1_parseFromJSON(expected_ue_behaviour_list); + if (!expected_ue_behaviour_list_local_nonprim) { + ogs_error("OpenAPI_expected_ue_behaviour_data_1_parseFromJSON failed [expected_ue_behaviour_list]"); + goto end; + } } primary_rat_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "primaryRatRestrictions"); @@ -1481,7 +1520,6 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s OpenAPI_edrx_parameters_1_t *edrx_parameters_listItem = OpenAPI_edrx_parameters_1_parseFromJSON(edrx_parameters_list_local); if (!edrx_parameters_listItem) { ogs_error("No edrx_parameters_listItem"); - OpenAPI_list_free(edrx_parameters_listList); goto end; } OpenAPI_list_add(edrx_parameters_listList, edrx_parameters_listItem); @@ -1506,7 +1544,6 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s OpenAPI_ptw_parameters_1_t *ptw_parameters_listItem = OpenAPI_ptw_parameters_1_parseFromJSON(ptw_parameters_list_local); if (!ptw_parameters_listItem) { ogs_error("No ptw_parameters_listItem"); - OpenAPI_list_free(ptw_parameters_listList); goto end; } OpenAPI_list_add(ptw_parameters_listList, ptw_parameters_listItem); @@ -1565,7 +1602,6 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s OpenAPI_wireline_area_1_t *wireline_forbidden_areasItem = OpenAPI_wireline_area_1_parseFromJSON(wireline_forbidden_areas_local); if (!wireline_forbidden_areasItem) { ogs_error("No wireline_forbidden_areasItem"); - OpenAPI_list_free(wireline_forbidden_areasList); goto end; } OpenAPI_list_add(wireline_forbidden_areasList, wireline_forbidden_areasItem); @@ -1575,6 +1611,10 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s wireline_service_area_restriction = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "wirelineServiceAreaRestriction"); if (wireline_service_area_restriction) { wireline_service_area_restriction_local_nonprim = OpenAPI_wireline_service_area_restriction_1_parseFromJSON(wireline_service_area_restriction); + if (!wireline_service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_1_parseFromJSON failed [wireline_service_area_restriction]"); + goto end; + } } pcf_selection_assistance_infos = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "pcfSelectionAssistanceInfos"); @@ -1595,7 +1635,6 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s OpenAPI_pcf_selection_assistance_info_1_t *pcf_selection_assistance_infosItem = OpenAPI_pcf_selection_assistance_info_1_parseFromJSON(pcf_selection_assistance_infos_local); if (!pcf_selection_assistance_infosItem) { ogs_error("No pcf_selection_assistance_infosItem"); - OpenAPI_list_free(pcf_selection_assistance_infosList); goto end; } OpenAPI_list_add(pcf_selection_assistance_infosList, pcf_selection_assistance_infosItem); @@ -1605,11 +1644,19 @@ OpenAPI_access_and_mobility_subscription_data_1_t *OpenAPI_access_and_mobility_s aerial_ue_sub_info = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "aerialUeSubInfo"); if (aerial_ue_sub_info) { aerial_ue_sub_info_local_nonprim = OpenAPI_aerial_ue_subscription_info_1_parseFromJSON(aerial_ue_sub_info); + if (!aerial_ue_sub_info_local_nonprim) { + ogs_error("OpenAPI_aerial_ue_subscription_info_1_parseFromJSON failed [aerial_ue_sub_info]"); + goto end; + } } roaming_restrictions = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "roamingRestrictions"); if (roaming_restrictions) { roaming_restrictions_local_nonprim = OpenAPI_roaming_restrictions_parseFromJSON(roaming_restrictions); + if (!roaming_restrictions_local_nonprim) { + ogs_error("OpenAPI_roaming_restrictions_parseFromJSON failed [roaming_restrictions]"); + goto end; + } } remote_prov_ind = cJSON_GetObjectItemCaseSensitive(access_and_mobility_subscription_data_1JSON, "remoteProvInd"); diff --git a/lib/sbi/openapi/model/access_net_charging_identifier.c b/lib/sbi/openapi/model/access_net_charging_identifier.c index 5dbd1d834..2bbfffabb 100644 --- a/lib/sbi/openapi/model/access_net_charging_identifier.c +++ b/lib/sbi/openapi/model/access_net_charging_identifier.c @@ -130,7 +130,6 @@ OpenAPI_access_net_charging_identifier_t *OpenAPI_access_net_charging_identifier OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/access_token_req.c b/lib/sbi/openapi/model/access_token_req.c index 5a7bf1159..119cc5e6f 100644 --- a/lib/sbi/openapi/model/access_token_req.c +++ b/lib/sbi/openapi/model/access_token_req.c @@ -473,6 +473,10 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access requester_plmn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterPlmn"); if (requester_plmn) { requester_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(requester_plmn); + if (!requester_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [requester_plmn]"); + goto end; + } } requester_plmn_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "requesterPlmnList"); @@ -493,7 +497,6 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access OpenAPI_plmn_id_t *requester_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(requester_plmn_list_local); if (!requester_plmn_listItem) { ogs_error("No requester_plmn_listItem"); - OpenAPI_list_free(requester_plmn_listList); goto end; } OpenAPI_list_add(requester_plmn_listList, requester_plmn_listItem); @@ -518,7 +521,6 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access OpenAPI_snssai_t *requester_snssai_listItem = OpenAPI_snssai_parseFromJSON(requester_snssai_list_local); if (!requester_snssai_listItem) { ogs_error("No requester_snssai_listItem"); - OpenAPI_list_free(requester_snssai_listList); goto end; } OpenAPI_list_add(requester_snssai_listList, requester_snssai_listItem); @@ -551,7 +553,6 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access OpenAPI_plmn_id_nid_t *requester_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(requester_snpn_list_local); if (!requester_snpn_listItem) { ogs_error("No requester_snpn_listItem"); - OpenAPI_list_free(requester_snpn_listList); goto end; } OpenAPI_list_add(requester_snpn_listList, requester_snpn_listItem); @@ -561,11 +562,19 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access target_plmn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetPlmn"); if (target_plmn) { target_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(target_plmn); + if (!target_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [target_plmn]"); + goto end; + } } target_snpn = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetSnpn"); if (target_snpn) { target_snpn_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(target_snpn); + if (!target_snpn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [target_snpn]"); + goto end; + } } target_snssai_list = cJSON_GetObjectItemCaseSensitive(access_token_reqJSON, "targetSnssaiList"); @@ -586,7 +595,6 @@ OpenAPI_access_token_req_t *OpenAPI_access_token_req_parseFromJSON(cJSON *access OpenAPI_snssai_t *target_snssai_listItem = OpenAPI_snssai_parseFromJSON(target_snssai_list_local); if (!target_snssai_listItem) { ogs_error("No target_snssai_listItem"); - OpenAPI_list_free(target_snssai_listList); goto end; } OpenAPI_list_add(target_snssai_listList, target_snssai_listItem); diff --git a/lib/sbi/openapi/model/additional_ee_subs_info.c b/lib/sbi/openapi/model/additional_ee_subs_info.c index 6ea27a58f..8f58042f8 100644 --- a/lib/sbi/openapi/model/additional_ee_subs_info.c +++ b/lib/sbi/openapi/model/additional_ee_subs_info.c @@ -130,7 +130,6 @@ OpenAPI_additional_ee_subs_info_t *OpenAPI_additional_ee_subs_info_parseFromJSON OpenAPI_amf_subscription_info_t *amf_subscription_info_listItem = OpenAPI_amf_subscription_info_parseFromJSON(amf_subscription_info_list_local); if (!amf_subscription_info_listItem) { ogs_error("No amf_subscription_info_listItem"); - OpenAPI_list_free(amf_subscription_info_listList); goto end; } OpenAPI_list_add(amf_subscription_info_listList, amf_subscription_info_listItem); @@ -140,11 +139,19 @@ OpenAPI_additional_ee_subs_info_t *OpenAPI_additional_ee_subs_info_parseFromJSON smf_subscription_info = cJSON_GetObjectItemCaseSensitive(additional_ee_subs_infoJSON, "smfSubscriptionInfo"); if (smf_subscription_info) { smf_subscription_info_local_nonprim = OpenAPI_smf_subscription_info_parseFromJSON(smf_subscription_info); + if (!smf_subscription_info_local_nonprim) { + ogs_error("OpenAPI_smf_subscription_info_parseFromJSON failed [smf_subscription_info]"); + goto end; + } } hss_subscription_info = cJSON_GetObjectItemCaseSensitive(additional_ee_subs_infoJSON, "hssSubscriptionInfo"); if (hss_subscription_info) { hss_subscription_info_local_nonprim = OpenAPI_hss_subscription_info_parseFromJSON(hss_subscription_info); + if (!hss_subscription_info_local_nonprim) { + ogs_error("OpenAPI_hss_subscription_info_parseFromJSON failed [hss_subscription_info]"); + goto end; + } } additional_ee_subs_info_local_var = OpenAPI_additional_ee_subs_info_create ( diff --git a/lib/sbi/openapi/model/additional_measurement.c b/lib/sbi/openapi/model/additional_measurement.c index 100f58184..6965c8263 100644 --- a/lib/sbi/openapi/model/additional_measurement.c +++ b/lib/sbi/openapi/model/additional_measurement.c @@ -184,6 +184,10 @@ OpenAPI_additional_measurement_t *OpenAPI_additional_measurement_parseFromJSON(c unexp_loc = cJSON_GetObjectItemCaseSensitive(additional_measurementJSON, "unexpLoc"); if (unexp_loc) { unexp_loc_local_nonprim = OpenAPI_network_area_info_parseFromJSON(unexp_loc); + if (!unexp_loc_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [unexp_loc]"); + goto end; + } } unexp_flow_teps = cJSON_GetObjectItemCaseSensitive(additional_measurementJSON, "unexpFlowTeps"); @@ -204,7 +208,6 @@ OpenAPI_additional_measurement_t *OpenAPI_additional_measurement_parseFromJSON(c OpenAPI_ip_eth_flow_description_t *unexp_flow_tepsItem = OpenAPI_ip_eth_flow_description_parseFromJSON(unexp_flow_teps_local); if (!unexp_flow_tepsItem) { ogs_error("No unexp_flow_tepsItem"); - OpenAPI_list_free(unexp_flow_tepsList); goto end; } OpenAPI_list_add(unexp_flow_tepsList, unexp_flow_tepsItem); @@ -230,11 +233,19 @@ OpenAPI_additional_measurement_t *OpenAPI_additional_measurement_parseFromJSON(c ddos_attack = cJSON_GetObjectItemCaseSensitive(additional_measurementJSON, "ddosAttack"); if (ddos_attack) { ddos_attack_local_nonprim = OpenAPI_address_list_parseFromJSON(ddos_attack); + if (!ddos_attack_local_nonprim) { + ogs_error("OpenAPI_address_list_parseFromJSON failed [ddos_attack]"); + goto end; + } } wrg_dest = cJSON_GetObjectItemCaseSensitive(additional_measurementJSON, "wrgDest"); if (wrg_dest) { wrg_dest_local_nonprim = OpenAPI_address_list_parseFromJSON(wrg_dest); + if (!wrg_dest_local_nonprim) { + ogs_error("OpenAPI_address_list_parseFromJSON failed [wrg_dest]"); + goto end; + } } circums = cJSON_GetObjectItemCaseSensitive(additional_measurementJSON, "circums"); @@ -255,7 +266,6 @@ OpenAPI_additional_measurement_t *OpenAPI_additional_measurement_parseFromJSON(c OpenAPI_circumstance_description_t *circumsItem = OpenAPI_circumstance_description_parseFromJSON(circums_local); if (!circumsItem) { ogs_error("No circumsItem"); - OpenAPI_list_free(circumsList); goto end; } OpenAPI_list_add(circumsList, circumsItem); diff --git a/lib/sbi/openapi/model/additional_snssai_data.c b/lib/sbi/openapi/model/additional_snssai_data.c index 99152be3e..6f54bce92 100644 --- a/lib/sbi/openapi/model/additional_snssai_data.c +++ b/lib/sbi/openapi/model/additional_snssai_data.c @@ -112,6 +112,10 @@ OpenAPI_additional_snssai_data_t *OpenAPI_additional_snssai_data_parseFromJSON(c subscribed_ue_slice_mbr = cJSON_GetObjectItemCaseSensitive(additional_snssai_dataJSON, "subscribedUeSliceMbr"); if (subscribed_ue_slice_mbr) { subscribed_ue_slice_mbr_local_nonprim = OpenAPI_slice_mbr_rm_parseFromJSON(subscribed_ue_slice_mbr); + if (!subscribed_ue_slice_mbr_local_nonprim) { + ogs_error("OpenAPI_slice_mbr_rm_parseFromJSON failed [subscribed_ue_slice_mbr]"); + goto end; + } } subscribed_ns_srg_list = cJSON_GetObjectItemCaseSensitive(additional_snssai_dataJSON, "subscribedNsSrgList"); diff --git a/lib/sbi/openapi/model/additional_snssai_data_1.c b/lib/sbi/openapi/model/additional_snssai_data_1.c index eb57d7b63..b39737985 100644 --- a/lib/sbi/openapi/model/additional_snssai_data_1.c +++ b/lib/sbi/openapi/model/additional_snssai_data_1.c @@ -112,6 +112,10 @@ OpenAPI_additional_snssai_data_1_t *OpenAPI_additional_snssai_data_1_parseFromJS subscribed_ue_slice_mbr = cJSON_GetObjectItemCaseSensitive(additional_snssai_data_1JSON, "subscribedUeSliceMbr"); if (subscribed_ue_slice_mbr) { subscribed_ue_slice_mbr_local_nonprim = OpenAPI_slice_mbr_rm_parseFromJSON(subscribed_ue_slice_mbr); + if (!subscribed_ue_slice_mbr_local_nonprim) { + ogs_error("OpenAPI_slice_mbr_rm_parseFromJSON failed [subscribed_ue_slice_mbr]"); + goto end; + } } subscribed_ns_srg_list = cJSON_GetObjectItemCaseSensitive(additional_snssai_data_1JSON, "subscribedNsSrgList"); diff --git a/lib/sbi/openapi/model/addr_fqdn.c b/lib/sbi/openapi/model/addr_fqdn.c index 77c2018bf..dfff91612 100644 --- a/lib/sbi/openapi/model/addr_fqdn.c +++ b/lib/sbi/openapi/model/addr_fqdn.c @@ -81,6 +81,10 @@ OpenAPI_addr_fqdn_t *OpenAPI_addr_fqdn_parseFromJSON(cJSON *addr_fqdnJSON) ip_addr = cJSON_GetObjectItemCaseSensitive(addr_fqdnJSON, "ipAddr"); if (ip_addr) { ip_addr_local_nonprim = OpenAPI_ip_addr_parseFromJSON(ip_addr); + if (!ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_addr_parseFromJSON failed [ip_addr]"); + goto end; + } } fqdn = cJSON_GetObjectItemCaseSensitive(addr_fqdnJSON, "fqdn"); diff --git a/lib/sbi/openapi/model/af_coordination_info.c b/lib/sbi/openapi/model/af_coordination_info.c index 1b5b3f1fc..7cbf33a50 100644 --- a/lib/sbi/openapi/model/af_coordination_info.c +++ b/lib/sbi/openapi/model/af_coordination_info.c @@ -154,7 +154,6 @@ OpenAPI_af_coordination_info_t *OpenAPI_af_coordination_info_parseFromJSON(cJSON OpenAPI_notification_info_t *notification_info_listItem = OpenAPI_notification_info_parseFromJSON(notification_info_list_local); if (!notification_info_listItem) { ogs_error("No notification_info_listItem"); - OpenAPI_list_free(notification_info_listList); goto end; } OpenAPI_list_add(notification_info_listList, notification_info_listItem); diff --git a/lib/sbi/openapi/model/af_event_notification.c b/lib/sbi/openapi/model/af_event_notification.c index d273973d8..d86a8fe87 100644 --- a/lib/sbi/openapi/model/af_event_notification.c +++ b/lib/sbi/openapi/model/af_event_notification.c @@ -112,7 +112,6 @@ OpenAPI_af_event_notification_t *OpenAPI_af_event_notification_parseFromJSON(cJS OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/af_external.c b/lib/sbi/openapi/model/af_external.c index 293537313..d8d1ae7a5 100644 --- a/lib/sbi/openapi/model/af_external.c +++ b/lib/sbi/openapi/model/af_external.c @@ -142,7 +142,6 @@ OpenAPI_af_external_t *OpenAPI_af_external_parseFromJSON(cJSON *af_externalJSON) OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local); if (!allowed_geographic_areaItem) { ogs_error("No allowed_geographic_areaItem"); - OpenAPI_list_free(allowed_geographic_areaList); goto end; } OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem); @@ -161,6 +160,10 @@ OpenAPI_af_external_t *OpenAPI_af_external_parseFromJSON(cJSON *af_externalJSON) valid_time_period = cJSON_GetObjectItemCaseSensitive(af_externalJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } af_external_local_var = OpenAPI_af_external_create ( diff --git a/lib/sbi/openapi/model/af_routing_requirement.c b/lib/sbi/openapi/model/af_routing_requirement.c index fbf781dab..f9922a255 100644 --- a/lib/sbi/openapi/model/af_routing_requirement.c +++ b/lib/sbi/openapi/model/af_routing_requirement.c @@ -264,7 +264,6 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local); if (!route_to_locsItem) { ogs_error("No route_to_locsItem"); - OpenAPI_list_free(route_to_locsList); goto end; } OpenAPI_list_add(route_to_locsList, route_to_locsItem); @@ -274,6 +273,10 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c sp_val = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "spVal"); if (sp_val) { sp_val_local_nonprim = OpenAPI_spatial_validity_parseFromJSON(sp_val); + if (!sp_val_local_nonprim) { + ogs_error("OpenAPI_spatial_validity_parseFromJSON failed [sp_val]"); + goto end; + } } temp_vals = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "tempVals"); @@ -294,7 +297,6 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local); if (!temp_valsItem) { ogs_error("No temp_valsItem"); - OpenAPI_list_free(temp_valsList); goto end; } OpenAPI_list_add(temp_valsList, temp_valsItem); @@ -304,6 +306,10 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c up_path_chg_sub = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "upPathChgSub"); if (up_path_chg_sub) { up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub); + if (!up_path_chg_sub_local_nonprim) { + ogs_error("OpenAPI_up_path_chg_event_parseFromJSON failed [up_path_chg_sub]"); + goto end; + } } addr_preser_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "addrPreserInd"); @@ -348,7 +354,6 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c OpenAPI_eas_ip_replacement_info_t *eas_ip_replace_infosItem = OpenAPI_eas_ip_replacement_info_parseFromJSON(eas_ip_replace_infos_local); if (!eas_ip_replace_infosItem) { ogs_error("No eas_ip_replace_infosItem"); - OpenAPI_list_free(eas_ip_replace_infosList); goto end; } OpenAPI_list_add(eas_ip_replace_infosList, eas_ip_replace_infosItem); diff --git a/lib/sbi/openapi/model/af_routing_requirement_rm.c b/lib/sbi/openapi/model/af_routing_requirement_rm.c index a0bca0185..a410776df 100644 --- a/lib/sbi/openapi/model/af_routing_requirement_rm.c +++ b/lib/sbi/openapi/model/af_routing_requirement_rm.c @@ -264,7 +264,6 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local); if (!route_to_locsItem) { ogs_error("No route_to_locsItem"); - OpenAPI_list_free(route_to_locsList); goto end; } OpenAPI_list_add(route_to_locsList, route_to_locsItem); @@ -274,6 +273,10 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom sp_val = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "spVal"); if (sp_val) { sp_val_local_nonprim = OpenAPI_spatial_validity_rm_parseFromJSON(sp_val); + if (!sp_val_local_nonprim) { + ogs_error("OpenAPI_spatial_validity_rm_parseFromJSON failed [sp_val]"); + goto end; + } } temp_vals = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "tempVals"); @@ -294,7 +297,6 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom OpenAPI_temporal_validity_t *temp_valsItem = OpenAPI_temporal_validity_parseFromJSON(temp_vals_local); if (!temp_valsItem) { ogs_error("No temp_valsItem"); - OpenAPI_list_free(temp_valsList); goto end; } OpenAPI_list_add(temp_valsList, temp_valsItem); @@ -304,6 +306,10 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom up_path_chg_sub = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "upPathChgSub"); if (up_path_chg_sub) { up_path_chg_sub_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_sub); + if (!up_path_chg_sub_local_nonprim) { + ogs_error("OpenAPI_up_path_chg_event_parseFromJSON failed [up_path_chg_sub]"); + goto end; + } } addr_preser_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirement_rmJSON, "addrPreserInd"); @@ -348,7 +354,6 @@ OpenAPI_af_routing_requirement_rm_t *OpenAPI_af_routing_requirement_rm_parseFrom OpenAPI_eas_ip_replacement_info_t *eas_ip_replace_infosItem = OpenAPI_eas_ip_replacement_info_parseFromJSON(eas_ip_replace_infos_local); if (!eas_ip_replace_infosItem) { ogs_error("No eas_ip_replace_infosItem"); - OpenAPI_list_free(eas_ip_replace_infosList); goto end; } OpenAPI_list_add(eas_ip_replace_infosList, eas_ip_replace_infosItem); diff --git a/lib/sbi/openapi/model/allowed_nssai.c b/lib/sbi/openapi/model/allowed_nssai.c index 03e6269a7..33efc5457 100644 --- a/lib/sbi/openapi/model/allowed_nssai.c +++ b/lib/sbi/openapi/model/allowed_nssai.c @@ -106,7 +106,6 @@ OpenAPI_allowed_nssai_t *OpenAPI_allowed_nssai_parseFromJSON(cJSON *allowed_nssa OpenAPI_allowed_snssai_t *allowed_snssai_listItem = OpenAPI_allowed_snssai_parseFromJSON(allowed_snssai_list_local); if (!allowed_snssai_listItem) { ogs_error("No allowed_snssai_listItem"); - OpenAPI_list_free(allowed_snssai_listList); goto end; } OpenAPI_list_add(allowed_snssai_listList, allowed_snssai_listItem); diff --git a/lib/sbi/openapi/model/allowed_snssai.c b/lib/sbi/openapi/model/allowed_snssai.c index 1df4d2510..76d1e7eed 100644 --- a/lib/sbi/openapi/model/allowed_snssai.c +++ b/lib/sbi/openapi/model/allowed_snssai.c @@ -120,6 +120,10 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_parseFromJSON(cJSON *allowed_sn goto end; } allowed_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(allowed_snssai); + if (!allowed_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [allowed_snssai]"); + goto end; + } nsi_information_list = cJSON_GetObjectItemCaseSensitive(allowed_snssaiJSON, "nsiInformationList"); if (nsi_information_list) { @@ -139,7 +143,6 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_parseFromJSON(cJSON *allowed_sn OpenAPI_nsi_information_t *nsi_information_listItem = OpenAPI_nsi_information_parseFromJSON(nsi_information_list_local); if (!nsi_information_listItem) { ogs_error("No nsi_information_listItem"); - OpenAPI_list_free(nsi_information_listList); goto end; } OpenAPI_list_add(nsi_information_listList, nsi_information_listItem); @@ -149,6 +152,10 @@ OpenAPI_allowed_snssai_t *OpenAPI_allowed_snssai_parseFromJSON(cJSON *allowed_sn mapped_home_snssai = cJSON_GetObjectItemCaseSensitive(allowed_snssaiJSON, "mappedHomeSnssai"); if (mapped_home_snssai) { mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai); + if (!mapped_home_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [mapped_home_snssai]"); + goto end; + } } allowed_snssai_local_var = OpenAPI_allowed_snssai_create ( diff --git a/lib/sbi/openapi/model/am_influ_data.c b/lib/sbi/openapi/model/am_influ_data.c index fbaeec513..696278a1f 100644 --- a/lib/sbi/openapi/model/am_influ_data.c +++ b/lib/sbi/openapi/model/am_influ_data.c @@ -358,7 +358,6 @@ OpenAPI_am_influ_data_t *OpenAPI_am_influ_data_parseFromJSON(cJSON *am_influ_dat OpenAPI_dnn_snssai_information_t *dnn_snssai_infosItem = OpenAPI_dnn_snssai_information_parseFromJSON(dnn_snssai_infos_local); if (!dnn_snssai_infosItem) { ogs_error("No dnn_snssai_infosItem"); - OpenAPI_list_free(dnn_snssai_infosList); goto end; } OpenAPI_list_add(dnn_snssai_infosList, dnn_snssai_infosItem); @@ -415,7 +414,6 @@ OpenAPI_am_influ_data_t *OpenAPI_am_influ_data_parseFromJSON(cJSON *am_influ_dat OpenAPI_am_influ_event_t *ev_subsItem = OpenAPI_am_influ_event_parseFromJSON(ev_subs_local); if (!ev_subsItem) { ogs_error("No ev_subsItem"); - OpenAPI_list_free(ev_subsList); goto end; } OpenAPI_list_add(ev_subsList, ev_subsItem); @@ -485,7 +483,6 @@ OpenAPI_am_influ_data_t *OpenAPI_am_influ_data_parseFromJSON(cJSON *am_influ_dat OpenAPI_service_area_coverage_info_t *cov_reqItem = OpenAPI_service_area_coverage_info_parseFromJSON(cov_req_local); if (!cov_reqItem) { ogs_error("No cov_reqItem"); - OpenAPI_list_free(cov_reqList); goto end; } OpenAPI_list_add(cov_reqList, cov_reqItem); diff --git a/lib/sbi/openapi/model/am_requested_value_rep.c b/lib/sbi/openapi/model/am_requested_value_rep.c index 62b952bd1..a4df68990 100644 --- a/lib/sbi/openapi/model/am_requested_value_rep.c +++ b/lib/sbi/openapi/model/am_requested_value_rep.c @@ -201,6 +201,10 @@ OpenAPI_am_requested_value_rep_t *OpenAPI_am_requested_value_rep_parseFromJSON(c user_loc = cJSON_GetObjectItemCaseSensitive(am_requested_value_repJSON, "userLoc"); if (user_loc) { user_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(user_loc); + if (!user_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_loc]"); + goto end; + } } pra_statuses = cJSON_GetObjectItemCaseSensitive(am_requested_value_repJSON, "praStatuses"); @@ -285,7 +289,6 @@ OpenAPI_am_requested_value_rep_t *OpenAPI_am_requested_value_rep_parseFromJSON(c 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); @@ -310,7 +313,6 @@ OpenAPI_am_requested_value_rep_t *OpenAPI_am_requested_value_rep_parseFromJSON(c 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); diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration.c b/lib/sbi/openapi/model/amf3_gpp_access_registration.c index d60271cba..ae22d7c8f 100644 --- a/lib/sbi/openapi/model/amf3_gpp_access_registration.c +++ b/lib/sbi/openapi/model/amf3_gpp_access_registration.c @@ -643,6 +643,10 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par goto end; } guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "backupAmfInfo"); if (backup_amf_info) { @@ -662,7 +666,6 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); @@ -707,6 +710,10 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par eps_interworking_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "epsInterworkingInfo"); if (eps_interworking_info) { eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info); + if (!eps_interworking_info_local_nonprim) { + ogs_error("OpenAPI_eps_interworking_info_parseFromJSON failed [eps_interworking_info]"); + goto end; + } } ue_srvcc_capability = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "ueSrvccCapability"); @@ -728,11 +735,19 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "vgmlcAddress"); if (vgmlc_address) { vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address); + if (!vgmlc_address_local_nonprim) { + ogs_error("OpenAPI_vgmlc_address_parseFromJSON failed [vgmlc_address]"); + goto end; + } } context_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "noEeSubscriptionInd"); diff --git a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c index ccc30e228..b609e5d6a 100644 --- a/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c +++ b/lib/sbi/openapi/model/amf3_gpp_access_registration_modification.c @@ -181,6 +181,10 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg goto end; } guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } purge_flag = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "purgeFlag"); if (purge_flag) { @@ -225,7 +229,6 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); @@ -235,6 +238,10 @@ OpenAPI_amf3_gpp_access_registration_modification_t *OpenAPI_amf3_gpp_access_reg eps_interworking_info = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "epsInterworkingInfo"); if (eps_interworking_info) { eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info); + if (!eps_interworking_info_local_nonprim) { + ogs_error("OpenAPI_eps_interworking_info_parseFromJSON failed [eps_interworking_info]"); + goto end; + } } ue_srvcc_capability = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registration_modificationJSON, "ueSrvccCapability"); diff --git a/lib/sbi/openapi/model/amf_event.c b/lib/sbi/openapi/model/amf_event.c index d0036dd75..1eb34d208 100644 --- a/lib/sbi/openapi/model/amf_event.c +++ b/lib/sbi/openapi/model/amf_event.c @@ -410,6 +410,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) goto end; } type_local_nonprim = OpenAPI_amf_event_type_parseFromJSON(type); + if (!type_local_nonprim) { + ogs_error("OpenAPI_amf_event_type_parseFromJSON failed [type]"); + goto end; + } immediate_flag = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "immediateFlag"); if (immediate_flag) { @@ -437,7 +441,6 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) OpenAPI_amf_event_area_t *area_listItem = OpenAPI_amf_event_area_parseFromJSON(area_list_local); if (!area_listItem) { ogs_error("No area_listItem"); - OpenAPI_list_free(area_listList); goto end; } OpenAPI_list_add(area_listList, area_listItem); @@ -462,7 +465,6 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) OpenAPI_location_filter_t *location_filter_listItem = OpenAPI_location_filter_parseFromJSON(location_filter_list_local); if (!location_filter_listItem) { ogs_error("No location_filter_listItem"); - OpenAPI_list_free(location_filter_listList); goto end; } OpenAPI_list_add(location_filter_listList, location_filter_listItem); @@ -495,7 +497,6 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) OpenAPI_traffic_descriptor_t *traffic_descriptor_listItem = OpenAPI_traffic_descriptor_parseFromJSON(traffic_descriptor_list_local); if (!traffic_descriptor_listItem) { ogs_error("No traffic_descriptor_listItem"); - OpenAPI_list_free(traffic_descriptor_listList); goto end; } OpenAPI_list_add(traffic_descriptor_listList, traffic_descriptor_listItem); @@ -513,6 +514,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) reachability_filter = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "reachabilityFilter"); if (reachability_filter) { reachability_filter_local_nonprim = OpenAPI_reachability_filter_parseFromJSON(reachability_filter); + if (!reachability_filter_local_nonprim) { + ogs_error("OpenAPI_reachability_filter_parseFromJSON failed [reachability_filter]"); + goto end; + } } udm_detect_ind = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "udmDetectInd"); @@ -568,6 +573,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) target_area = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "targetArea"); if (target_area) { target_area_local_nonprim = OpenAPI_target_area_parseFromJSON(target_area); + if (!target_area_local_nonprim) { + ogs_error("OpenAPI_target_area_parseFromJSON failed [target_area]"); + goto end; + } } snssai_filter = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "snssaiFilter"); @@ -588,7 +597,6 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) OpenAPI_ext_snssai_t *snssai_filterItem = OpenAPI_ext_snssai_parseFromJSON(snssai_filter_local); if (!snssai_filterItem) { ogs_error("No snssai_filterItem"); - OpenAPI_list_free(snssai_filterList); goto end; } OpenAPI_list_add(snssai_filterList, snssai_filterItem); @@ -598,6 +606,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) ue_in_area_filter = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "ueInAreaFilter"); if (ue_in_area_filter) { ue_in_area_filter_local_nonprim = OpenAPI_ue_in_area_filter_parseFromJSON(ue_in_area_filter); + if (!ue_in_area_filter_local_nonprim) { + ogs_error("OpenAPI_ue_in_area_filter_parseFromJSON failed [ue_in_area_filter]"); + goto end; + } } min_interval = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "minInterval"); @@ -627,6 +639,10 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON) dispersion_area = cJSON_GetObjectItemCaseSensitive(amf_eventJSON, "dispersionArea"); if (dispersion_area) { dispersion_area_local_nonprim = OpenAPI_dispersion_area_parseFromJSON(dispersion_area); + if (!dispersion_area_local_nonprim) { + ogs_error("OpenAPI_dispersion_area_parseFromJSON failed [dispersion_area]"); + goto end; + } } amf_event_local_var = OpenAPI_amf_event_create ( diff --git a/lib/sbi/openapi/model/amf_event_area.c b/lib/sbi/openapi/model/amf_event_area.c index 6f22d715a..6a39d2d2b 100644 --- a/lib/sbi/openapi/model/amf_event_area.c +++ b/lib/sbi/openapi/model/amf_event_area.c @@ -123,16 +123,28 @@ OpenAPI_amf_event_area_t *OpenAPI_amf_event_area_parseFromJSON(cJSON *amf_event_ presence_info = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "presenceInfo"); if (presence_info) { presence_info_local_nonprim = OpenAPI_presence_info_parseFromJSON(presence_info); + if (!presence_info_local_nonprim) { + ogs_error("OpenAPI_presence_info_parseFromJSON failed [presence_info]"); + goto end; + } } ladn_info = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "ladnInfo"); if (ladn_info) { ladn_info_local_nonprim = OpenAPI_ladn_info_parseFromJSON(ladn_info); + if (!ladn_info_local_nonprim) { + ogs_error("OpenAPI_ladn_info_parseFromJSON failed [ladn_info]"); + goto end; + } } s_nssai = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } nsi_id = cJSON_GetObjectItemCaseSensitive(amf_event_areaJSON, "nsiId"); diff --git a/lib/sbi/openapi/model/amf_event_mode.c b/lib/sbi/openapi/model/amf_event_mode.c index a41d777cd..6702fb9c2 100644 --- a/lib/sbi/openapi/model/amf_event_mode.c +++ b/lib/sbi/openapi/model/amf_event_mode.c @@ -155,6 +155,10 @@ OpenAPI_amf_event_mode_t *OpenAPI_amf_event_mode_parseFromJSON(cJSON *amf_event_ goto end; } trigger_local_nonprim = OpenAPI_amf_event_trigger_parseFromJSON(trigger); + if (!trigger_local_nonprim) { + ogs_error("OpenAPI_amf_event_trigger_parseFromJSON failed [trigger]"); + goto end; + } max_reports = cJSON_GetObjectItemCaseSensitive(amf_event_modeJSON, "maxReports"); if (max_reports) { diff --git a/lib/sbi/openapi/model/amf_event_subscription.c b/lib/sbi/openapi/model/amf_event_subscription.c index 666783d92..8147dd277 100644 --- a/lib/sbi/openapi/model/amf_event_subscription.c +++ b/lib/sbi/openapi/model/amf_event_subscription.c @@ -369,7 +369,6 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c OpenAPI_amf_event_t *event_listItem = OpenAPI_amf_event_parseFromJSON(event_list_local); if (!event_listItem) { ogs_error("No event_listItem"); - OpenAPI_list_free(event_listList); goto end; } OpenAPI_list_add(event_listList, event_listItem); @@ -548,6 +547,10 @@ OpenAPI_amf_event_subscription_t *OpenAPI_amf_event_subscription_parseFromJSON(c options = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "options"); if (options) { options_local_nonprim = OpenAPI_amf_event_mode_parseFromJSON(options); + if (!options_local_nonprim) { + ogs_error("OpenAPI_amf_event_mode_parseFromJSON failed [options]"); + goto end; + } } source_nf_type = cJSON_GetObjectItemCaseSensitive(amf_event_subscriptionJSON, "sourceNfType"); diff --git a/lib/sbi/openapi/model/amf_info.c b/lib/sbi/openapi/model/amf_info.c index f28965518..8de09659f 100644 --- a/lib/sbi/openapi/model/amf_info.c +++ b/lib/sbi/openapi/model/amf_info.c @@ -286,7 +286,6 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); @@ -310,7 +309,6 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -335,7 +333,6 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -360,7 +357,6 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) OpenAPI_guami_t *backup_info_amf_failureItem = OpenAPI_guami_parseFromJSON(backup_info_amf_failure_local); if (!backup_info_amf_failureItem) { ogs_error("No backup_info_amf_failureItem"); - OpenAPI_list_free(backup_info_amf_failureList); goto end; } OpenAPI_list_add(backup_info_amf_failureList, backup_info_amf_failureItem); @@ -385,7 +381,6 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) OpenAPI_guami_t *backup_info_amf_removalItem = OpenAPI_guami_parseFromJSON(backup_info_amf_removal_local); if (!backup_info_amf_removalItem) { ogs_error("No backup_info_amf_removalItem"); - OpenAPI_list_free(backup_info_amf_removalList); goto end; } OpenAPI_list_add(backup_info_amf_removalList, backup_info_amf_removalItem); @@ -395,6 +390,10 @@ OpenAPI_amf_info_t *OpenAPI_amf_info_parseFromJSON(cJSON *amf_infoJSON) n2_interface_amf_info = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "n2InterfaceAmfInfo"); if (n2_interface_amf_info) { n2_interface_amf_info_local_nonprim = OpenAPI_n2_interface_amf_info_parseFromJSON(n2_interface_amf_info); + if (!n2_interface_amf_info_local_nonprim) { + ogs_error("OpenAPI_n2_interface_amf_info_parseFromJSON failed [n2_interface_amf_info]"); + goto end; + } } amf_onboarding_capability = cJSON_GetObjectItemCaseSensitive(amf_infoJSON, "amfOnboardingCapability"); diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c index bec8c4089..c194a70d0 100644 --- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c +++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration.c @@ -539,6 +539,10 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra goto end; } guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "backupAmfInfo"); if (backup_amf_info) { @@ -558,7 +562,6 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); @@ -603,11 +606,19 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "vgmlcAddress"); if (vgmlc_address) { vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address); + if (!vgmlc_address_local_nonprim) { + ogs_error("OpenAPI_vgmlc_address_parseFromJSON failed [vgmlc_address]"); + goto end; + } } context_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "noEeSubscriptionInd"); diff --git a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c index 05114b59d..302f7ae8c 100644 --- a/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c +++ b/lib/sbi/openapi/model/amf_non3_gpp_access_registration_modification.c @@ -136,6 +136,10 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac goto end; } guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } purge_flag = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registration_modificationJSON, "purgeFlag"); if (purge_flag) { @@ -180,7 +184,6 @@ OpenAPI_amf_non3_gpp_access_registration_modification_t *OpenAPI_amf_non3_gpp_ac OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); diff --git a/lib/sbi/openapi/model/amf_status_change_notification.c b/lib/sbi/openapi/model/amf_status_change_notification.c index eee8699b8..9ca9771ca 100644 --- a/lib/sbi/openapi/model/amf_status_change_notification.c +++ b/lib/sbi/openapi/model/amf_status_change_notification.c @@ -93,7 +93,6 @@ OpenAPI_amf_status_change_notification_t *OpenAPI_amf_status_change_notification OpenAPI_amf_status_info_t *amf_status_info_listItem = OpenAPI_amf_status_info_parseFromJSON(amf_status_info_list_local); if (!amf_status_info_listItem) { ogs_error("No amf_status_info_listItem"); - OpenAPI_list_free(amf_status_info_listList); goto end; } OpenAPI_list_add(amf_status_info_listList, amf_status_info_listItem); diff --git a/lib/sbi/openapi/model/amf_status_info.c b/lib/sbi/openapi/model/amf_status_info.c index 07e793d65..1d96720da 100644 --- a/lib/sbi/openapi/model/amf_status_info.c +++ b/lib/sbi/openapi/model/amf_status_info.c @@ -134,7 +134,6 @@ OpenAPI_amf_status_info_t *OpenAPI_amf_status_info_parseFromJSON(cJSON *amf_stat OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); diff --git a/lib/sbi/openapi/model/amf_subscription_info.c b/lib/sbi/openapi/model/amf_subscription_info.c index 3179de8c2..ab49c80f5 100644 --- a/lib/sbi/openapi/model/amf_subscription_info.c +++ b/lib/sbi/openapi/model/amf_subscription_info.c @@ -141,6 +141,10 @@ OpenAPI_amf_subscription_info_t *OpenAPI_amf_subscription_info_parseFromJSON(cJS context_info = cJSON_GetObjectItemCaseSensitive(amf_subscription_infoJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } amf_subscription_info_local_var = OpenAPI_amf_subscription_info_create ( diff --git a/lib/sbi/openapi/model/analytics_metadata_indication.c b/lib/sbi/openapi/model/analytics_metadata_indication.c index c926ce3fb..171f9e76f 100644 --- a/lib/sbi/openapi/model/analytics_metadata_indication.c +++ b/lib/sbi/openapi/model/analytics_metadata_indication.c @@ -140,6 +140,10 @@ OpenAPI_analytics_metadata_indication_t *OpenAPI_analytics_metadata_indication_p data_window = cJSON_GetObjectItemCaseSensitive(analytics_metadata_indicationJSON, "dataWindow"); if (data_window) { data_window_local_nonprim = OpenAPI_time_window_parseFromJSON(data_window); + if (!data_window_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [data_window]"); + goto end; + } } data_stat_props = cJSON_GetObjectItemCaseSensitive(analytics_metadata_indicationJSON, "dataStatProps"); @@ -160,7 +164,6 @@ OpenAPI_analytics_metadata_indication_t *OpenAPI_analytics_metadata_indication_p OpenAPI_dataset_statistical_property_t *data_stat_propsItem = OpenAPI_dataset_statistical_property_parseFromJSON(data_stat_props_local); if (!data_stat_propsItem) { ogs_error("No data_stat_propsItem"); - OpenAPI_list_free(data_stat_propsList); goto end; } OpenAPI_list_add(data_stat_propsList, data_stat_propsItem); @@ -170,6 +173,10 @@ OpenAPI_analytics_metadata_indication_t *OpenAPI_analytics_metadata_indication_p strategy = cJSON_GetObjectItemCaseSensitive(analytics_metadata_indicationJSON, "strategy"); if (strategy) { strategy_local_nonprim = OpenAPI_output_strategy_parseFromJSON(strategy); + if (!strategy_local_nonprim) { + ogs_error("OpenAPI_output_strategy_parseFromJSON failed [strategy]"); + goto end; + } } aggr_nwdaf_ids = cJSON_GetObjectItemCaseSensitive(analytics_metadata_indicationJSON, "aggrNwdafIds"); diff --git a/lib/sbi/openapi/model/analytics_metadata_info.c b/lib/sbi/openapi/model/analytics_metadata_info.c index 9ac086199..1bd36b376 100644 --- a/lib/sbi/openapi/model/analytics_metadata_info.c +++ b/lib/sbi/openapi/model/analytics_metadata_info.c @@ -156,6 +156,10 @@ OpenAPI_analytics_metadata_info_t *OpenAPI_analytics_metadata_info_parseFromJSON data_window = cJSON_GetObjectItemCaseSensitive(analytics_metadata_infoJSON, "dataWindow"); if (data_window) { data_window_local_nonprim = OpenAPI_time_window_parseFromJSON(data_window); + if (!data_window_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [data_window]"); + goto end; + } } data_stat_props = cJSON_GetObjectItemCaseSensitive(analytics_metadata_infoJSON, "dataStatProps"); @@ -176,7 +180,6 @@ OpenAPI_analytics_metadata_info_t *OpenAPI_analytics_metadata_info_parseFromJSON OpenAPI_dataset_statistical_property_t *data_stat_propsItem = OpenAPI_dataset_statistical_property_parseFromJSON(data_stat_props_local); if (!data_stat_propsItem) { ogs_error("No data_stat_propsItem"); - OpenAPI_list_free(data_stat_propsList); goto end; } OpenAPI_list_add(data_stat_propsList, data_stat_propsItem); @@ -186,11 +189,19 @@ OpenAPI_analytics_metadata_info_t *OpenAPI_analytics_metadata_info_parseFromJSON strategy = cJSON_GetObjectItemCaseSensitive(analytics_metadata_infoJSON, "strategy"); if (strategy) { strategy_local_nonprim = OpenAPI_output_strategy_parseFromJSON(strategy); + if (!strategy_local_nonprim) { + ogs_error("OpenAPI_output_strategy_parseFromJSON failed [strategy]"); + goto end; + } } accuracy = cJSON_GetObjectItemCaseSensitive(analytics_metadata_infoJSON, "accuracy"); if (accuracy) { accuracy_local_nonprim = OpenAPI_accuracy_parseFromJSON(accuracy); + if (!accuracy_local_nonprim) { + ogs_error("OpenAPI_accuracy_parseFromJSON failed [accuracy]"); + goto end; + } } analytics_metadata_info_local_var = OpenAPI_analytics_metadata_info_create ( diff --git a/lib/sbi/openapi/model/analytics_subscription.c b/lib/sbi/openapi/model/analytics_subscription.c index a055ec6cd..822b056b3 100644 --- a/lib/sbi/openapi/model/analytics_subscription.c +++ b/lib/sbi/openapi/model/analytics_subscription.c @@ -137,7 +137,6 @@ OpenAPI_analytics_subscription_t *OpenAPI_analytics_subscription_parseFromJSON(c OpenAPI_nwdaf_subscription_t *nwdaf_subscription_listItem = OpenAPI_nwdaf_subscription_parseFromJSON(nwdaf_subscription_list_local); if (!nwdaf_subscription_listItem) { ogs_error("No nwdaf_subscription_listItem"); - OpenAPI_list_free(nwdaf_subscription_listList); goto end; } OpenAPI_list_add(nwdaf_subscription_listList, nwdaf_subscription_listItem); diff --git a/lib/sbi/openapi/model/api_ie_mapping.c b/lib/sbi/openapi/model/api_ie_mapping.c index bdb92216b..4a29eaf8c 100644 --- a/lib/sbi/openapi/model/api_ie_mapping.c +++ b/lib/sbi/openapi/model/api_ie_mapping.c @@ -114,6 +114,10 @@ OpenAPI_api_ie_mapping_t *OpenAPI_api_ie_mapping_parseFromJSON(cJSON *api_ie_map goto end; } api_signature_local_nonprim = OpenAPI_api_signature_parseFromJSON(api_signature); + if (!api_signature_local_nonprim) { + ogs_error("OpenAPI_api_signature_parseFromJSON failed [api_signature]"); + goto end; + } api_method = cJSON_GetObjectItemCaseSensitive(api_ie_mappingJSON, "apiMethod"); if (!api_method) { @@ -147,7 +151,6 @@ OpenAPI_api_ie_mapping_t *OpenAPI_api_ie_mapping_parseFromJSON(cJSON *api_ie_map OpenAPI_ie_info_t *ie_listItem = OpenAPI_ie_info_parseFromJSON(ie_list_local); if (!ie_listItem) { ogs_error("No ie_listItem"); - OpenAPI_list_free(ie_listList); goto end; } OpenAPI_list_add(ie_listList, ie_listItem); diff --git a/lib/sbi/openapi/model/app_detection_info.c b/lib/sbi/openapi/model/app_detection_info.c index f5e719710..9f9eb75ca 100644 --- a/lib/sbi/openapi/model/app_detection_info.c +++ b/lib/sbi/openapi/model/app_detection_info.c @@ -136,7 +136,6 @@ OpenAPI_app_detection_info_t *OpenAPI_app_detection_info_parseFromJSON(cJSON *ap OpenAPI_flow_information_t *sdf_descriptionsItem = OpenAPI_flow_information_parseFromJSON(sdf_descriptions_local); if (!sdf_descriptionsItem) { ogs_error("No sdf_descriptionsItem"); - OpenAPI_list_free(sdf_descriptionsList); goto end; } OpenAPI_list_add(sdf_descriptionsList, sdf_descriptionsItem); diff --git a/lib/sbi/openapi/model/app_list_for_ue_comm.c b/lib/sbi/openapi/model/app_list_for_ue_comm.c index cb801559a..6f92ef353 100644 --- a/lib/sbi/openapi/model/app_list_for_ue_comm.c +++ b/lib/sbi/openapi/model/app_list_for_ue_comm.c @@ -155,6 +155,10 @@ OpenAPI_app_list_for_ue_comm_t *OpenAPI_app_list_for_ue_comm_parseFromJSON(cJSON spatial_validity = cJSON_GetObjectItemCaseSensitive(app_list_for_ue_commJSON, "spatialValidity"); if (spatial_validity) { spatial_validity_local_nonprim = OpenAPI_network_area_info_parseFromJSON(spatial_validity); + if (!spatial_validity_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [spatial_validity]"); + goto end; + } } app_list_for_ue_comm_local_var = OpenAPI_app_list_for_ue_comm_create ( diff --git a/lib/sbi/openapi/model/app_session_context.c b/lib/sbi/openapi/model/app_session_context.c index 8a5db4aff..aa61faeb0 100644 --- a/lib/sbi/openapi/model/app_session_context.c +++ b/lib/sbi/openapi/model/app_session_context.c @@ -109,16 +109,28 @@ OpenAPI_app_session_context_t *OpenAPI_app_session_context_parseFromJSON(cJSON * asc_req_data = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "ascReqData"); if (asc_req_data) { asc_req_data_local_nonprim = OpenAPI_app_session_context_req_data_parseFromJSON(asc_req_data); + if (!asc_req_data_local_nonprim) { + ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON failed [asc_req_data]"); + goto end; + } } asc_resp_data = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "ascRespData"); if (asc_resp_data) { asc_resp_data_local_nonprim = OpenAPI_app_session_context_resp_data_parseFromJSON(asc_resp_data); + if (!asc_resp_data_local_nonprim) { + ogs_error("OpenAPI_app_session_context_resp_data_parseFromJSON failed [asc_resp_data]"); + goto end; + } } evs_notif = cJSON_GetObjectItemCaseSensitive(app_session_contextJSON, "evsNotif"); if (evs_notif) { evs_notif_local_nonprim = OpenAPI_events_notification_parseFromJSON(evs_notif); + if (!evs_notif_local_nonprim) { + ogs_error("OpenAPI_events_notification_parseFromJSON failed [evs_notif]"); + goto end; + } } app_session_context_local_var = OpenAPI_app_session_context_create ( diff --git a/lib/sbi/openapi/model/app_session_context_req_data.c b/lib/sbi/openapi/model/app_session_context_req_data.c index 37e3194ee..cd4baa5b8 100644 --- a/lib/sbi/openapi/model/app_session_context_req_data.c +++ b/lib/sbi/openapi/model/app_session_context_req_data.c @@ -575,6 +575,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par af_rout_req = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "afRoutReq"); if (af_rout_req) { af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_parseFromJSON(af_rout_req); + if (!af_rout_req_local_nonprim) { + ogs_error("OpenAPI_af_routing_requirement_parseFromJSON failed [af_rout_req]"); + goto end; + } } asp_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "aspId"); @@ -604,6 +608,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par ev_subsc = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "evSubsc"); if (ev_subsc) { ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_parseFromJSON(ev_subsc); + if (!ev_subsc_local_nonprim) { + ogs_error("OpenAPI_events_subsc_req_data_parseFromJSON failed [ev_subsc]"); + goto end; + } } mcptt_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "mcpttId"); @@ -729,6 +737,10 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par slice_info = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "sliceInfo"); if (slice_info) { slice_info_local_nonprim = OpenAPI_snssai_parseFromJSON(slice_info); + if (!slice_info_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [slice_info]"); + goto end; + } } spon_id = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "sponId"); @@ -801,11 +813,19 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(app_session_context_req_dataJSON, "tsnPortManContNwtts"); @@ -826,7 +846,6 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); diff --git a/lib/sbi/openapi/model/app_session_context_resp_data.c b/lib/sbi/openapi/model/app_session_context_resp_data.c index 111da488b..dfb70251c 100644 --- a/lib/sbi/openapi/model/app_session_context_resp_data.c +++ b/lib/sbi/openapi/model/app_session_context_resp_data.c @@ -122,7 +122,6 @@ OpenAPI_app_session_context_resp_data_t *OpenAPI_app_session_context_resp_data_p OpenAPI_ue_identity_info_t *ue_idsItem = OpenAPI_ue_identity_info_parseFromJSON(ue_ids_local); if (!ue_idsItem) { ogs_error("No ue_idsItem"); - OpenAPI_list_free(ue_idsList); goto end; } OpenAPI_list_add(ue_idsList, ue_idsItem); diff --git a/lib/sbi/openapi/model/app_session_context_update_data.c b/lib/sbi/openapi/model/app_session_context_update_data.c index e65133ff9..216d90190 100644 --- a/lib/sbi/openapi/model/app_session_context_update_data.c +++ b/lib/sbi/openapi/model/app_session_context_update_data.c @@ -389,6 +389,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da af_rout_req = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "afRoutReq"); if (af_rout_req) { af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_rm_parseFromJSON(af_rout_req); + if (!af_rout_req_local_nonprim) { + ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON failed [af_rout_req]"); + goto end; + } } asp_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "aspId"); @@ -410,6 +414,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da ev_subsc = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "evSubsc"); if (ev_subsc) { ev_subsc_local_nonprim = OpenAPI_events_subsc_req_data_rm_parseFromJSON(ev_subsc); + if (!ev_subsc_local_nonprim) { + ogs_error("OpenAPI_events_subsc_req_data_rm_parseFromJSON failed [ev_subsc]"); + goto end; + } } mcptt_id = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "mcpttId"); @@ -482,6 +490,10 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da preempt_control_info = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "preemptControlInfo"); if (preempt_control_info) { preempt_control_info_local_nonprim = OpenAPI_preemption_control_information_rm_parseFromJSON(preempt_control_info); + if (!preempt_control_info_local_nonprim) { + ogs_error("OpenAPI_preemption_control_information_rm_parseFromJSON failed [preempt_control_info]"); + goto end; + } } res_prio = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "resPrio"); @@ -531,11 +543,19 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(app_session_context_update_dataJSON, "tsnPortManContNwtts"); @@ -556,7 +576,6 @@ OpenAPI_app_session_context_update_data_t *OpenAPI_app_session_context_update_da OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); diff --git a/lib/sbi/openapi/model/app_session_context_update_data_patch.c b/lib/sbi/openapi/model/app_session_context_update_data_patch.c index 9471391c0..5f30e0c60 100644 --- a/lib/sbi/openapi/model/app_session_context_update_data_patch.c +++ b/lib/sbi/openapi/model/app_session_context_update_data_patch.c @@ -67,6 +67,10 @@ OpenAPI_app_session_context_update_data_patch_t *OpenAPI_app_session_context_upd asc_req_data = cJSON_GetObjectItemCaseSensitive(app_session_context_update_data_patchJSON, "ascReqData"); if (asc_req_data) { asc_req_data_local_nonprim = OpenAPI_app_session_context_update_data_parseFromJSON(asc_req_data); + if (!asc_req_data_local_nonprim) { + ogs_error("OpenAPI_app_session_context_update_data_parseFromJSON failed [asc_req_data]"); + goto end; + } } app_session_context_update_data_patch_local_var = OpenAPI_app_session_context_update_data_patch_create ( diff --git a/lib/sbi/openapi/model/application_data_change_notif.c b/lib/sbi/openapi/model/application_data_change_notif.c index 81afea1db..d1a0c69a5 100644 --- a/lib/sbi/openapi/model/application_data_change_notif.c +++ b/lib/sbi/openapi/model/application_data_change_notif.c @@ -167,16 +167,28 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p iptv_config_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "iptvConfigData"); if (iptv_config_data) { iptv_config_data_local_nonprim = OpenAPI_iptv_config_data_parseFromJSON(iptv_config_data); + if (!iptv_config_data_local_nonprim) { + ogs_error("OpenAPI_iptv_config_data_parseFromJSON failed [iptv_config_data]"); + goto end; + } } pfd_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "pfdData"); if (pfd_data) { pfd_data_local_nonprim = OpenAPI_pfd_change_notification_parseFromJSON(pfd_data); + if (!pfd_data_local_nonprim) { + ogs_error("OpenAPI_pfd_change_notification_parseFromJSON failed [pfd_data]"); + goto end; + } } bdt_policy_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "bdtPolicyData"); if (bdt_policy_data) { bdt_policy_data_local_nonprim = OpenAPI_bdt_policy_data_parseFromJSON(bdt_policy_data); + if (!bdt_policy_data_local_nonprim) { + ogs_error("OpenAPI_bdt_policy_data_parseFromJSON failed [bdt_policy_data]"); + goto end; + } } res_uri = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "resUri"); @@ -192,11 +204,19 @@ OpenAPI_application_data_change_notif_t *OpenAPI_application_data_change_notif_p ser_param_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "serParamData"); if (ser_param_data) { ser_param_data_local_nonprim = OpenAPI_service_parameter_data_parseFromJSON(ser_param_data); + if (!ser_param_data_local_nonprim) { + ogs_error("OpenAPI_service_parameter_data_parseFromJSON failed [ser_param_data]"); + goto end; + } } am_influ_data = cJSON_GetObjectItemCaseSensitive(application_data_change_notifJSON, "amInfluData"); if (am_influ_data) { am_influ_data_local_nonprim = OpenAPI_am_influ_data_parseFromJSON(am_influ_data); + if (!am_influ_data_local_nonprim) { + ogs_error("OpenAPI_am_influ_data_parseFromJSON failed [am_influ_data]"); + goto end; + } } application_data_change_notif_local_var = OpenAPI_application_data_change_notif_create ( diff --git a/lib/sbi/openapi/model/application_data_subs.c b/lib/sbi/openapi/model/application_data_subs.c index ec6f5f14b..8ef96fb6d 100644 --- a/lib/sbi/openapi/model/application_data_subs.c +++ b/lib/sbi/openapi/model/application_data_subs.c @@ -206,7 +206,6 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJS OpenAPI_data_filter_t *data_filtersItem = OpenAPI_data_filter_parseFromJSON(data_filters_local); if (!data_filtersItem) { ogs_error("No data_filtersItem"); - OpenAPI_list_free(data_filtersList); goto end; } OpenAPI_list_add(data_filtersList, data_filtersItem); @@ -247,7 +246,6 @@ OpenAPI_application_data_subs_t *OpenAPI_application_data_subs_parseFromJSON(cJS OpenAPI_am_influ_data_t *am_influ_entriesItem = OpenAPI_am_influ_data_parseFromJSON(am_influ_entries_local); if (!am_influ_entriesItem) { ogs_error("No am_influ_entriesItem"); - OpenAPI_list_free(am_influ_entriesList); goto end; } OpenAPI_list_add(am_influ_entriesList, am_influ_entriesItem); diff --git a/lib/sbi/openapi/model/area_of_validity.c b/lib/sbi/openapi/model/area_of_validity.c index 51de8888f..cce404caf 100644 --- a/lib/sbi/openapi/model/area_of_validity.c +++ b/lib/sbi/openapi/model/area_of_validity.c @@ -93,7 +93,6 @@ OpenAPI_area_of_validity_t *OpenAPI_area_of_validity_parseFromJSON(cJSON *area_o OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); diff --git a/lib/sbi/openapi/model/assign_ebi_data.c b/lib/sbi/openapi/model/assign_ebi_data.c index 6a55b54a1..9c2ee3a94 100644 --- a/lib/sbi/openapi/model/assign_ebi_data.c +++ b/lib/sbi/openapi/model/assign_ebi_data.c @@ -179,7 +179,6 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e OpenAPI_arp_t *arp_listItem = OpenAPI_arp_parseFromJSON(arp_list_local); if (!arp_listItem) { ogs_error("No arp_listItem"); - OpenAPI_list_free(arp_listList); goto end; } OpenAPI_list_add(arp_listList, arp_listItem); @@ -216,6 +215,10 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e old_guami = cJSON_GetObjectItemCaseSensitive(assign_ebi_dataJSON, "oldGuami"); if (old_guami) { old_guami_local_nonprim = OpenAPI_guami_parseFromJSON(old_guami); + if (!old_guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [old_guami]"); + goto end; + } } modified_ebi_list = cJSON_GetObjectItemCaseSensitive(assign_ebi_dataJSON, "modifiedEbiList"); @@ -236,7 +239,6 @@ OpenAPI_assign_ebi_data_t *OpenAPI_assign_ebi_data_parseFromJSON(cJSON *assign_e OpenAPI_ebi_arp_mapping_t *modified_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(modified_ebi_list_local); if (!modified_ebi_listItem) { ogs_error("No modified_ebi_listItem"); - OpenAPI_list_free(modified_ebi_listList); goto end; } OpenAPI_list_add(modified_ebi_listList, modified_ebi_listItem); diff --git a/lib/sbi/openapi/model/assign_ebi_error.c b/lib/sbi/openapi/model/assign_ebi_error.c index 5a623fb10..6b0572f81 100644 --- a/lib/sbi/openapi/model/assign_ebi_error.c +++ b/lib/sbi/openapi/model/assign_ebi_error.c @@ -95,6 +95,10 @@ OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_parseFromJSON(cJSON *assign goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } failure_details = cJSON_GetObjectItemCaseSensitive(assign_ebi_errorJSON, "failureDetails"); if (!failure_details) { @@ -102,6 +106,10 @@ OpenAPI_assign_ebi_error_t *OpenAPI_assign_ebi_error_parseFromJSON(cJSON *assign goto end; } failure_details_local_nonprim = OpenAPI_assign_ebi_failed_parseFromJSON(failure_details); + if (!failure_details_local_nonprim) { + ogs_error("OpenAPI_assign_ebi_failed_parseFromJSON failed [failure_details]"); + goto end; + } assign_ebi_error_local_var = OpenAPI_assign_ebi_error_create ( error_local_nonprim, diff --git a/lib/sbi/openapi/model/assign_ebi_failed.c b/lib/sbi/openapi/model/assign_ebi_failed.c index 226db11ce..95cf3a7d9 100644 --- a/lib/sbi/openapi/model/assign_ebi_failed.c +++ b/lib/sbi/openapi/model/assign_ebi_failed.c @@ -106,7 +106,6 @@ OpenAPI_assign_ebi_failed_t *OpenAPI_assign_ebi_failed_parseFromJSON(cJSON *assi OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local); if (!failed_arp_listItem) { ogs_error("No failed_arp_listItem"); - OpenAPI_list_free(failed_arp_listList); goto end; } OpenAPI_list_add(failed_arp_listList, failed_arp_listItem); diff --git a/lib/sbi/openapi/model/assigned_ebi_data.c b/lib/sbi/openapi/model/assigned_ebi_data.c index 82eb805a4..d8ee1cf5f 100644 --- a/lib/sbi/openapi/model/assigned_ebi_data.c +++ b/lib/sbi/openapi/model/assigned_ebi_data.c @@ -188,7 +188,6 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi OpenAPI_ebi_arp_mapping_t *assigned_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(assigned_ebi_list_local); if (!assigned_ebi_listItem) { ogs_error("No assigned_ebi_listItem"); - OpenAPI_list_free(assigned_ebi_listList); goto end; } OpenAPI_list_add(assigned_ebi_listList, assigned_ebi_listItem); @@ -212,7 +211,6 @@ OpenAPI_assigned_ebi_data_t *OpenAPI_assigned_ebi_data_parseFromJSON(cJSON *assi OpenAPI_arp_t *failed_arp_listItem = OpenAPI_arp_parseFromJSON(failed_arp_list_local); if (!failed_arp_listItem) { ogs_error("No failed_arp_listItem"); - OpenAPI_list_free(failed_arp_listList); goto end; } OpenAPI_list_add(failed_arp_listList, failed_arp_listItem); diff --git a/lib/sbi/openapi/model/ausf_info.c b/lib/sbi/openapi/model/ausf_info.c index ecbc63f2c..e48787db8 100644 --- a/lib/sbi/openapi/model/ausf_info.c +++ b/lib/sbi/openapi/model/ausf_info.c @@ -162,7 +162,6 @@ OpenAPI_ausf_info_t *OpenAPI_ausf_info_parseFromJSON(cJSON *ausf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -208,7 +207,6 @@ OpenAPI_ausf_info_t *OpenAPI_ausf_info_parseFromJSON(cJSON *ausf_infoJSON) OpenAPI_suci_info_t *suci_infosItem = OpenAPI_suci_info_parseFromJSON(suci_infos_local); if (!suci_infosItem) { ogs_error("No suci_infosItem"); - OpenAPI_list_free(suci_infosList); goto end; } OpenAPI_list_add(suci_infosList, suci_infosItem); diff --git a/lib/sbi/openapi/model/authentication_info.c b/lib/sbi/openapi/model/authentication_info.c index 8095ddcf0..89c82255f 100644 --- a/lib/sbi/openapi/model/authentication_info.c +++ b/lib/sbi/openapi/model/authentication_info.c @@ -269,6 +269,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON * resynchronization_info = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "resynchronizationInfo"); if (resynchronization_info) { resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info); + if (!resynchronization_info_local_nonprim) { + ogs_error("OpenAPI_resynchronization_info_parseFromJSON failed [resynchronization_info]"); + goto end; + } } pei = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "pei"); @@ -282,6 +286,10 @@ OpenAPI_authentication_info_t *OpenAPI_authentication_info_parseFromJSON(cJSON * trace_data = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } udm_group_id = cJSON_GetObjectItemCaseSensitive(authentication_infoJSON, "udmGroupId"); diff --git a/lib/sbi/openapi/model/authentication_info_request.c b/lib/sbi/openapi/model/authentication_info_request.c index 3f3fc5f3e..9eb21bfbc 100644 --- a/lib/sbi/openapi/model/authentication_info_request.c +++ b/lib/sbi/openapi/model/authentication_info_request.c @@ -192,6 +192,10 @@ OpenAPI_authentication_info_request_t *OpenAPI_authentication_info_request_parse resynchronization_info = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "resynchronizationInfo"); if (resynchronization_info) { resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info); + if (!resynchronization_info_local_nonprim) { + ogs_error("OpenAPI_resynchronization_info_parseFromJSON failed [resynchronization_info]"); + goto end; + } } ausf_instance_id = cJSON_GetObjectItemCaseSensitive(authentication_info_requestJSON, "ausfInstanceId"); diff --git a/lib/sbi/openapi/model/authentication_info_result.c b/lib/sbi/openapi/model/authentication_info_result.c index 8b8e53058..09fd029f2 100644 --- a/lib/sbi/openapi/model/authentication_info_result.c +++ b/lib/sbi/openapi/model/authentication_info_result.c @@ -192,6 +192,10 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr authentication_vector = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "authenticationVector"); if (authentication_vector) { authentication_vector_local_nonprim = OpenAPI_authentication_vector_parseFromJSON(authentication_vector); + if (!authentication_vector_local_nonprim) { + ogs_error("OpenAPI_authentication_vector_parseFromJSON failed [authentication_vector]"); + goto end; + } } supi = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "supi"); @@ -244,7 +248,6 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local); if (!pvs_infoItem) { ogs_error("No pvs_infoItem"); - OpenAPI_list_free(pvs_infoList); goto end; } OpenAPI_list_add(pvs_infoList, pvs_infoItem); diff --git a/lib/sbi/openapi/model/authentication_subscription.c b/lib/sbi/openapi/model/authentication_subscription.c index 3b4adcf5f..38b29242e 100644 --- a/lib/sbi/openapi/model/authentication_subscription.c +++ b/lib/sbi/openapi/model/authentication_subscription.c @@ -280,6 +280,10 @@ OpenAPI_authentication_subscription_t *OpenAPI_authentication_subscription_parse sequence_number = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "sequenceNumber"); if (sequence_number) { sequence_number_local_nonprim = OpenAPI_sequence_number_parseFromJSON(sequence_number); + if (!sequence_number_local_nonprim) { + ogs_error("OpenAPI_sequence_number_parseFromJSON failed [sequence_number]"); + goto end; + } } authentication_management_field = cJSON_GetObjectItemCaseSensitive(authentication_subscriptionJSON, "authenticationManagementField"); diff --git a/lib/sbi/openapi/model/authorization_data.c b/lib/sbi/openapi/model/authorization_data.c index da6a19634..e80f3b305 100644 --- a/lib/sbi/openapi/model/authorization_data.c +++ b/lib/sbi/openapi/model/authorization_data.c @@ -186,7 +186,6 @@ OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *au OpenAPI_user_identifier_t *authorization_dataItem = OpenAPI_user_identifier_parseFromJSON(authorization_data_local); if (!authorization_dataItem) { ogs_error("No authorization_dataItem"); - OpenAPI_list_free(authorization_dataList); goto end; } OpenAPI_list_add(authorization_dataList, authorization_dataItem); @@ -231,7 +230,6 @@ OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *au OpenAPI_snssai_t *allowed_snssai_listItem = OpenAPI_snssai_parseFromJSON(allowed_snssai_list_local); if (!allowed_snssai_listItem) { ogs_error("No allowed_snssai_listItem"); - OpenAPI_list_free(allowed_snssai_listList); goto end; } OpenAPI_list_add(allowed_snssai_listList, allowed_snssai_listItem); @@ -256,7 +254,6 @@ OpenAPI_authorization_data_t *OpenAPI_authorization_data_parseFromJSON(cJSON *au OpenAPI_mtc_provider_t *allowed_mtc_providersItem = OpenAPI_mtc_provider_parseFromJSON(allowed_mtc_providers_local); if (!allowed_mtc_providersItem) { ogs_error("No allowed_mtc_providersItem"); - OpenAPI_list_free(allowed_mtc_providersList); goto end; } OpenAPI_list_add(allowed_mtc_providersList, allowed_mtc_providersItem); diff --git a/lib/sbi/openapi/model/authorization_info.c b/lib/sbi/openapi/model/authorization_info.c index ee9d3eab3..182b9a492 100644 --- a/lib/sbi/openapi/model/authorization_info.c +++ b/lib/sbi/openapi/model/authorization_info.c @@ -183,6 +183,10 @@ OpenAPI_authorization_info_t *OpenAPI_authorization_info_parseFromJSON(cJSON *au goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(authorization_infoJSON, "dnn"); if (!dnn) { @@ -241,6 +245,10 @@ OpenAPI_authorization_info_t *OpenAPI_authorization_info_parseFromJSON(cJSON *au context_info = cJSON_GetObjectItemCaseSensitive(authorization_infoJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } authorization_info_local_var = OpenAPI_authorization_info_create ( diff --git a/lib/sbi/openapi/model/authorized_default_qos.c b/lib/sbi/openapi/model/authorized_default_qos.c index 6299d7868..cd4a857b2 100644 --- a/lib/sbi/openapi/model/authorized_default_qos.c +++ b/lib/sbi/openapi/model/authorized_default_qos.c @@ -191,6 +191,10 @@ OpenAPI_authorized_default_qos_t *OpenAPI_authorized_default_qos_parseFromJSON(c arp = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "arp"); if (arp) { arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } } priority_level = cJSON_GetObjectItemCaseSensitive(authorized_default_qosJSON, "priorityLevel"); diff --git a/lib/sbi/openapi/model/authorized_network_slice_info.c b/lib/sbi/openapi/model/authorized_network_slice_info.c index 19bbff747..83c8d8526 100644 --- a/lib/sbi/openapi/model/authorized_network_slice_info.c +++ b/lib/sbi/openapi/model/authorized_network_slice_info.c @@ -385,7 +385,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_allowed_nssai_t *allowed_nssai_listItem = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_list_local); if (!allowed_nssai_listItem) { ogs_error("No allowed_nssai_listItem"); - OpenAPI_list_free(allowed_nssai_listList); goto end; } OpenAPI_list_add(allowed_nssai_listList, allowed_nssai_listItem); @@ -410,7 +409,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local); if (!configured_nssaiItem) { ogs_error("No configured_nssaiItem"); - OpenAPI_list_free(configured_nssaiList); goto end; } OpenAPI_list_add(configured_nssaiList, configured_nssaiItem); @@ -464,7 +462,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local); if (!rejected_nssai_in_plmnItem) { ogs_error("No rejected_nssai_in_plmnItem"); - OpenAPI_list_free(rejected_nssai_in_plmnList); goto end; } OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem); @@ -489,7 +486,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local); if (!rejected_nssai_in_taItem) { ogs_error("No rejected_nssai_in_taItem"); - OpenAPI_list_free(rejected_nssai_in_taList); goto end; } OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem); @@ -499,6 +495,10 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p nsi_information = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "nsiInformation"); if (nsi_information) { nsi_information_local_nonprim = OpenAPI_nsi_information_parseFromJSON(nsi_information); + if (!nsi_information_local_nonprim) { + ogs_error("OpenAPI_nsi_information_parseFromJSON failed [nsi_information]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(authorized_network_slice_infoJSON, "supportedFeatures"); @@ -589,7 +589,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_snssai_t *target_nssaiItem = OpenAPI_snssai_parseFromJSON(target_nssai_local); if (!target_nssaiItem) { ogs_error("No target_nssaiItem"); - OpenAPI_list_free(target_nssaiList); goto end; } OpenAPI_list_add(target_nssaiList, target_nssaiItem); @@ -614,7 +613,6 @@ OpenAPI_authorized_network_slice_info_t *OpenAPI_authorized_network_slice_info_p OpenAPI_nsag_info_t *nsag_infosItem = OpenAPI_nsag_info_parseFromJSON(nsag_infos_local); if (!nsag_infosItem) { ogs_error("No nsag_infosItem"); - OpenAPI_list_free(nsag_infosList); goto end; } OpenAPI_list_add(nsag_infosList, nsag_infosItem); diff --git a/lib/sbi/openapi/model/backup_amf_info.c b/lib/sbi/openapi/model/backup_amf_info.c index ae9901f33..90505c769 100644 --- a/lib/sbi/openapi/model/backup_amf_info.c +++ b/lib/sbi/openapi/model/backup_amf_info.c @@ -114,7 +114,6 @@ OpenAPI_backup_amf_info_t *OpenAPI_backup_amf_info_parseFromJSON(cJSON *backup_a OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); diff --git a/lib/sbi/openapi/model/bdt_data.c b/lib/sbi/openapi/model/bdt_data.c index 333a5a545..bb346e0ea 100644 --- a/lib/sbi/openapi/model/bdt_data.c +++ b/lib/sbi/openapi/model/bdt_data.c @@ -275,6 +275,10 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON) goto end; } trans_policy_local_nonprim = OpenAPI_transfer_policy_parseFromJSON(trans_policy); + if (!trans_policy_local_nonprim) { + ogs_error("OpenAPI_transfer_policy_parseFromJSON failed [trans_policy]"); + goto end; + } bdt_ref_id = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "bdtRefId"); if (bdt_ref_id) { @@ -287,6 +291,10 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON) nw_area_info = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "nwAreaInfo"); if (nw_area_info) { nw_area_info_local_nonprim = OpenAPI_network_area_info_2_parseFromJSON(nw_area_info); + if (!nw_area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_2_parseFromJSON failed [nw_area_info]"); + goto end; + } } num_of_ues = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "numOfUes"); @@ -300,6 +308,10 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON) vol_per_ue = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "volPerUe"); if (vol_per_ue) { vol_per_ue_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(vol_per_ue); + if (!vol_per_ue_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_parseFromJSON failed [vol_per_ue]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "dnn"); @@ -313,6 +325,10 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON) snssai = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } traffic_des = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "trafficDes"); @@ -326,6 +342,10 @@ OpenAPI_bdt_data_t *OpenAPI_bdt_data_parseFromJSON(cJSON *bdt_dataJSON) bdtp_status = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "bdtpStatus"); if (bdtp_status) { bdtp_status_local_nonprim = OpenAPI_bdt_policy_status_parseFromJSON(bdtp_status); + if (!bdtp_status_local_nonprim) { + ogs_error("OpenAPI_bdt_policy_status_parseFromJSON failed [bdtp_status]"); + goto end; + } } supp_feat = cJSON_GetObjectItemCaseSensitive(bdt_dataJSON, "suppFeat"); diff --git a/lib/sbi/openapi/model/bdt_data_patch.c b/lib/sbi/openapi/model/bdt_data_patch.c index e0047e90e..3421679e2 100644 --- a/lib/sbi/openapi/model/bdt_data_patch.c +++ b/lib/sbi/openapi/model/bdt_data_patch.c @@ -88,11 +88,19 @@ OpenAPI_bdt_data_patch_t *OpenAPI_bdt_data_patch_parseFromJSON(cJSON *bdt_data_p trans_policy = cJSON_GetObjectItemCaseSensitive(bdt_data_patchJSON, "transPolicy"); if (trans_policy) { trans_policy_local_nonprim = OpenAPI_transfer_policy_parseFromJSON(trans_policy); + if (!trans_policy_local_nonprim) { + ogs_error("OpenAPI_transfer_policy_parseFromJSON failed [trans_policy]"); + goto end; + } } bdtp_status = cJSON_GetObjectItemCaseSensitive(bdt_data_patchJSON, "bdtpStatus"); if (bdtp_status) { bdtp_status_local_nonprim = OpenAPI_bdt_policy_status_parseFromJSON(bdtp_status); + if (!bdtp_status_local_nonprim) { + ogs_error("OpenAPI_bdt_policy_status_parseFromJSON failed [bdtp_status]"); + goto end; + } } bdt_data_patch_local_var = OpenAPI_bdt_data_patch_create ( diff --git a/lib/sbi/openapi/model/bdt_policy_data.c b/lib/sbi/openapi/model/bdt_policy_data.c index 1ec060cca..ae7125e1d 100644 --- a/lib/sbi/openapi/model/bdt_policy_data.c +++ b/lib/sbi/openapi/model/bdt_policy_data.c @@ -198,6 +198,10 @@ OpenAPI_bdt_policy_data_t *OpenAPI_bdt_policy_data_parseFromJSON(cJSON *bdt_poli snssai = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } res_uri = cJSON_GetObjectItemCaseSensitive(bdt_policy_dataJSON, "resUri"); diff --git a/lib/sbi/openapi/model/binding_resp.c b/lib/sbi/openapi/model/binding_resp.c index 166965bdc..5944bc134 100644 --- a/lib/sbi/openapi/model/binding_resp.c +++ b/lib/sbi/openapi/model/binding_resp.c @@ -110,7 +110,6 @@ OpenAPI_binding_resp_t *OpenAPI_binding_resp_parseFromJSON(cJSON *binding_respJS OpenAPI_ip_end_point_t *pcf_sm_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_sm_ip_end_points_local); if (!pcf_sm_ip_end_pointsItem) { ogs_error("No pcf_sm_ip_end_pointsItem"); - OpenAPI_list_free(pcf_sm_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_sm_ip_end_pointsList, pcf_sm_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/bsf_event_notification.c b/lib/sbi/openapi/model/bsf_event_notification.c index 832b1d5e1..568bc8139 100644 --- a/lib/sbi/openapi/model/bsf_event_notification.c +++ b/lib/sbi/openapi/model/bsf_event_notification.c @@ -145,6 +145,10 @@ OpenAPI_bsf_event_notification_t *OpenAPI_bsf_event_notification_parseFromJSON(c pcf_for_ue_info = cJSON_GetObjectItemCaseSensitive(bsf_event_notificationJSON, "pcfForUeInfo"); if (pcf_for_ue_info) { pcf_for_ue_info_local_nonprim = OpenAPI_pcf_for_ue_info_parseFromJSON(pcf_for_ue_info); + if (!pcf_for_ue_info_local_nonprim) { + ogs_error("OpenAPI_pcf_for_ue_info_parseFromJSON failed [pcf_for_ue_info]"); + goto end; + } } pcf_for_pdu_sess_infos = cJSON_GetObjectItemCaseSensitive(bsf_event_notificationJSON, "pcfForPduSessInfos"); @@ -165,7 +169,6 @@ OpenAPI_bsf_event_notification_t *OpenAPI_bsf_event_notification_parseFromJSON(c OpenAPI_pcf_for_pdu_session_info_t *pcf_for_pdu_sess_infosItem = OpenAPI_pcf_for_pdu_session_info_parseFromJSON(pcf_for_pdu_sess_infos_local); if (!pcf_for_pdu_sess_infosItem) { ogs_error("No pcf_for_pdu_sess_infosItem"); - OpenAPI_list_free(pcf_for_pdu_sess_infosList); goto end; } OpenAPI_list_add(pcf_for_pdu_sess_infosList, pcf_for_pdu_sess_infosItem); @@ -190,7 +193,6 @@ OpenAPI_bsf_event_notification_t *OpenAPI_bsf_event_notification_parseFromJSON(c OpenAPI_snssai_dnn_pair_t *match_snssai_dnnsItem = OpenAPI_snssai_dnn_pair_parseFromJSON(match_snssai_dnns_local); if (!match_snssai_dnnsItem) { ogs_error("No match_snssai_dnnsItem"); - OpenAPI_list_free(match_snssai_dnnsList); goto end; } OpenAPI_list_add(match_snssai_dnnsList, match_snssai_dnnsItem); diff --git a/lib/sbi/openapi/model/bsf_info.c b/lib/sbi/openapi/model/bsf_info.c index 8b5f52f32..5b5b7eed5 100644 --- a/lib/sbi/openapi/model/bsf_info.c +++ b/lib/sbi/openapi/model/bsf_info.c @@ -303,7 +303,6 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON) OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local); if (!ipv4_address_rangesItem) { ogs_error("No ipv4_address_rangesItem"); - OpenAPI_list_free(ipv4_address_rangesList); goto end; } OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem); @@ -328,7 +327,6 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON) OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local); if (!ipv6_prefix_rangesItem) { ogs_error("No ipv6_prefix_rangesItem"); - OpenAPI_list_free(ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem); @@ -377,7 +375,6 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -402,7 +399,6 @@ OpenAPI_bsf_info_t *OpenAPI_bsf_info_parseFromJSON(cJSON *bsf_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); diff --git a/lib/sbi/openapi/model/bsf_notification.c b/lib/sbi/openapi/model/bsf_notification.c index d6dfb8613..bd038de79 100644 --- a/lib/sbi/openapi/model/bsf_notification.c +++ b/lib/sbi/openapi/model/bsf_notification.c @@ -183,7 +183,6 @@ OpenAPI_bsf_notification_t *OpenAPI_bsf_notification_parseFromJSON(cJSON *bsf_no OpenAPI_bsf_event_notification_t *event_notifsItem = OpenAPI_bsf_event_notification_parseFromJSON(event_notifs_local); if (!event_notifsItem) { ogs_error("No event_notifsItem"); - OpenAPI_list_free(event_notifsList); goto end; } OpenAPI_list_add(event_notifsList, event_notifsItem); diff --git a/lib/sbi/openapi/model/bsf_subscription.c b/lib/sbi/openapi/model/bsf_subscription.c index ee3e6a03c..86103e22a 100644 --- a/lib/sbi/openapi/model/bsf_subscription.c +++ b/lib/sbi/openapi/model/bsf_subscription.c @@ -253,6 +253,10 @@ OpenAPI_bsf_subscription_t *OpenAPI_bsf_subscription_parseFromJSON(cJSON *bsf_su snssai_dnn_pairs = cJSON_GetObjectItemCaseSensitive(bsf_subscriptionJSON, "snssaiDnnPairs"); if (snssai_dnn_pairs) { snssai_dnn_pairs_local_nonprim = OpenAPI_snssai_dnn_pair_parseFromJSON(snssai_dnn_pairs); + if (!snssai_dnn_pairs_local_nonprim) { + ogs_error("OpenAPI_snssai_dnn_pair_parseFromJSON failed [snssai_dnn_pairs]"); + goto end; + } } add_snssai_dnn_pairs = cJSON_GetObjectItemCaseSensitive(bsf_subscriptionJSON, "addSnssaiDnnPairs"); @@ -273,7 +277,6 @@ OpenAPI_bsf_subscription_t *OpenAPI_bsf_subscription_parseFromJSON(cJSON *bsf_su OpenAPI_snssai_dnn_pair_t *add_snssai_dnn_pairsItem = OpenAPI_snssai_dnn_pair_parseFromJSON(add_snssai_dnn_pairs_local); if (!add_snssai_dnn_pairsItem) { ogs_error("No add_snssai_dnn_pairsItem"); - OpenAPI_list_free(add_snssai_dnn_pairsList); goto end; } OpenAPI_list_add(add_snssai_dnn_pairsList, add_snssai_dnn_pairsItem); diff --git a/lib/sbi/openapi/model/bsf_subscription_resp.c b/lib/sbi/openapi/model/bsf_subscription_resp.c index ec8602f41..1a0ecab65 100644 --- a/lib/sbi/openapi/model/bsf_subscription_resp.c +++ b/lib/sbi/openapi/model/bsf_subscription_resp.c @@ -321,6 +321,10 @@ OpenAPI_bsf_subscription_resp_t *OpenAPI_bsf_subscription_resp_parseFromJSON(cJS snssai_dnn_pairs = cJSON_GetObjectItemCaseSensitive(bsf_subscription_respJSON, "snssaiDnnPairs"); if (snssai_dnn_pairs) { snssai_dnn_pairs_local_nonprim = OpenAPI_snssai_dnn_pair_parseFromJSON(snssai_dnn_pairs); + if (!snssai_dnn_pairs_local_nonprim) { + ogs_error("OpenAPI_snssai_dnn_pair_parseFromJSON failed [snssai_dnn_pairs]"); + goto end; + } } add_snssai_dnn_pairs = cJSON_GetObjectItemCaseSensitive(bsf_subscription_respJSON, "addSnssaiDnnPairs"); @@ -341,7 +345,6 @@ OpenAPI_bsf_subscription_resp_t *OpenAPI_bsf_subscription_resp_parseFromJSON(cJS OpenAPI_snssai_dnn_pair_t *add_snssai_dnn_pairsItem = OpenAPI_snssai_dnn_pair_parseFromJSON(add_snssai_dnn_pairs_local); if (!add_snssai_dnn_pairsItem) { ogs_error("No add_snssai_dnn_pairsItem"); - OpenAPI_list_free(add_snssai_dnn_pairsList); goto end; } OpenAPI_list_add(add_snssai_dnn_pairsList, add_snssai_dnn_pairsItem); @@ -402,7 +405,6 @@ OpenAPI_bsf_subscription_resp_t *OpenAPI_bsf_subscription_resp_parseFromJSON(cJS OpenAPI_bsf_event_notification_t *event_notifsItem = OpenAPI_bsf_event_notification_parseFromJSON(event_notifs_local); if (!event_notifsItem) { ogs_error("No event_notifsItem"); - OpenAPI_list_free(event_notifsList); goto end; } OpenAPI_list_add(event_notifsList, event_notifsItem); diff --git a/lib/sbi/openapi/model/cancel_relocate_ue_context_request.c b/lib/sbi/openapi/model/cancel_relocate_ue_context_request.c index 5cfe1679a..d51d1734a 100644 --- a/lib/sbi/openapi/model/cancel_relocate_ue_context_request.c +++ b/lib/sbi/openapi/model/cancel_relocate_ue_context_request.c @@ -84,6 +84,10 @@ OpenAPI_cancel_relocate_ue_context_request_t *OpenAPI_cancel_relocate_ue_context json_data = cJSON_GetObjectItemCaseSensitive(cancel_relocate_ue_context_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_cancel_relocate_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_cancel_relocate_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_gtpc_message = cJSON_GetObjectItemCaseSensitive(cancel_relocate_ue_context_requestJSON, "binaryDataGtpcMessage"); diff --git a/lib/sbi/openapi/model/candidate_for_replacement.c b/lib/sbi/openapi/model/candidate_for_replacement.c index 22ee3d7dd..368d635cc 100644 --- a/lib/sbi/openapi/model/candidate_for_replacement.c +++ b/lib/sbi/openapi/model/candidate_for_replacement.c @@ -97,6 +97,10 @@ OpenAPI_candidate_for_replacement_t *OpenAPI_candidate_for_replacement_parseFrom goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnns = cJSON_GetObjectItemCaseSensitive(candidate_for_replacementJSON, "dnns"); if (dnns) { diff --git a/lib/sbi/openapi/model/cell_global_id.c b/lib/sbi/openapi/model/cell_global_id.c index b83fddc98..6662eef0e 100644 --- a/lib/sbi/openapi/model/cell_global_id.c +++ b/lib/sbi/openapi/model/cell_global_id.c @@ -104,6 +104,10 @@ OpenAPI_cell_global_id_t *OpenAPI_cell_global_id_parseFromJSON(cJSON *cell_globa goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } lac = cJSON_GetObjectItemCaseSensitive(cell_global_idJSON, "lac"); if (!lac) { diff --git a/lib/sbi/openapi/model/chf_info.c b/lib/sbi/openapi/model/chf_info.c index ae47e8fe0..d06972024 100644 --- a/lib/sbi/openapi/model/chf_info.c +++ b/lib/sbi/openapi/model/chf_info.c @@ -184,7 +184,6 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_parseFromJSON(cJSON *chf_infoJSON) OpenAPI_supi_range_t *supi_range_listItem = OpenAPI_supi_range_parseFromJSON(supi_range_list_local); if (!supi_range_listItem) { ogs_error("No supi_range_listItem"); - OpenAPI_list_free(supi_range_listList); goto end; } OpenAPI_list_add(supi_range_listList, supi_range_listItem); @@ -209,7 +208,6 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_parseFromJSON(cJSON *chf_infoJSON) OpenAPI_identity_range_t *gpsi_range_listItem = OpenAPI_identity_range_parseFromJSON(gpsi_range_list_local); if (!gpsi_range_listItem) { ogs_error("No gpsi_range_listItem"); - OpenAPI_list_free(gpsi_range_listList); goto end; } OpenAPI_list_add(gpsi_range_listList, gpsi_range_listItem); @@ -234,7 +232,6 @@ OpenAPI_chf_info_t *OpenAPI_chf_info_parseFromJSON(cJSON *chf_infoJSON) OpenAPI_plmn_range_t *plmn_range_listItem = OpenAPI_plmn_range_parseFromJSON(plmn_range_list_local); if (!plmn_range_listItem) { ogs_error("No plmn_range_listItem"); - OpenAPI_list_free(plmn_range_listList); goto end; } OpenAPI_list_add(plmn_range_listList, plmn_range_listItem); diff --git a/lib/sbi/openapi/model/circumstance_description.c b/lib/sbi/openapi/model/circumstance_description.c index 0c4e892ef..413853c0e 100644 --- a/lib/sbi/openapi/model/circumstance_description.c +++ b/lib/sbi/openapi/model/circumstance_description.c @@ -121,6 +121,10 @@ OpenAPI_circumstance_description_t *OpenAPI_circumstance_description_parseFromJS loc_area = cJSON_GetObjectItemCaseSensitive(circumstance_descriptionJSON, "locArea"); if (loc_area) { loc_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(loc_area); + if (!loc_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [loc_area]"); + goto end; + } } vol = cJSON_GetObjectItemCaseSensitive(circumstance_descriptionJSON, "vol"); diff --git a/lib/sbi/openapi/model/class_criterion.c b/lib/sbi/openapi/model/class_criterion.c index 8602e0720..6b46f80c7 100644 --- a/lib/sbi/openapi/model/class_criterion.c +++ b/lib/sbi/openapi/model/class_criterion.c @@ -103,6 +103,10 @@ OpenAPI_class_criterion_t *OpenAPI_class_criterion_parseFromJSON(cJSON *class_cr goto end; } disper_class_local_nonprim = OpenAPI_dispersion_class_parseFromJSON(disper_class); + if (!disper_class_local_nonprim) { + ogs_error("OpenAPI_dispersion_class_parseFromJSON failed [disper_class]"); + goto end; + } class_threshold = cJSON_GetObjectItemCaseSensitive(class_criterionJSON, "classThreshold"); if (!class_threshold) { @@ -120,6 +124,10 @@ OpenAPI_class_criterion_t *OpenAPI_class_criterion_parseFromJSON(cJSON *class_cr goto end; } thres_match_local_nonprim = OpenAPI_matching_direction_parseFromJSON(thres_match); + if (!thres_match_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [thres_match]"); + goto end; + } class_criterion_local_var = OpenAPI_class_criterion_create ( disper_class_local_nonprim, diff --git a/lib/sbi/openapi/model/cm_info.c b/lib/sbi/openapi/model/cm_info.c index 709f5927e..1293385db 100644 --- a/lib/sbi/openapi/model/cm_info.c +++ b/lib/sbi/openapi/model/cm_info.c @@ -85,6 +85,10 @@ OpenAPI_cm_info_t *OpenAPI_cm_info_parseFromJSON(cJSON *cm_infoJSON) goto end; } cm_state_local_nonprim = OpenAPI_cm_state_parseFromJSON(cm_state); + if (!cm_state_local_nonprim) { + ogs_error("OpenAPI_cm_state_parseFromJSON failed [cm_state]"); + goto end; + } access_type = cJSON_GetObjectItemCaseSensitive(cm_infoJSON, "accessType"); if (!access_type) { diff --git a/lib/sbi/openapi/model/cn_assisted_ran_para.c b/lib/sbi/openapi/model/cn_assisted_ran_para.c index 7965e35f4..3dddab744 100644 --- a/lib/sbi/openapi/model/cn_assisted_ran_para.c +++ b/lib/sbi/openapi/model/cn_assisted_ran_para.c @@ -170,6 +170,10 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_parseFromJSON(cJSON scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "scheduledCommunicationTime"); if (scheduled_communication_time) { scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time); + if (!scheduled_communication_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_parseFromJSON failed [scheduled_communication_time]"); + goto end; + } } scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "scheduledCommunicationType"); @@ -193,6 +197,10 @@ OpenAPI_cn_assisted_ran_para_t *OpenAPI_cn_assisted_ran_para_parseFromJSON(cJSON battery_indication = cJSON_GetObjectItemCaseSensitive(cn_assisted_ran_paraJSON, "batteryIndication"); if (battery_indication) { battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication); + if (!battery_indication_local_nonprim) { + ogs_error("OpenAPI_battery_indication_parseFromJSON failed [battery_indication]"); + goto end; + } } cn_assisted_ran_para_local_var = OpenAPI_cn_assisted_ran_para_create ( diff --git a/lib/sbi/openapi/model/cnf.c b/lib/sbi/openapi/model/cnf.c index 8158dafda..577d8395a 100644 --- a/lib/sbi/openapi/model/cnf.c +++ b/lib/sbi/openapi/model/cnf.c @@ -93,7 +93,6 @@ OpenAPI_cnf_t *OpenAPI_cnf_parseFromJSON(cJSON *cnfJSON) OpenAPI_cnf_unit_t *cnf_unitsItem = OpenAPI_cnf_unit_parseFromJSON(cnf_units_local); if (!cnf_unitsItem) { ogs_error("No cnf_unitsItem"); - OpenAPI_list_free(cnf_unitsList); goto end; } OpenAPI_list_add(cnf_unitsList, cnf_unitsItem); diff --git a/lib/sbi/openapi/model/cnf_unit.c b/lib/sbi/openapi/model/cnf_unit.c index 189fca64c..cd66c5edd 100644 --- a/lib/sbi/openapi/model/cnf_unit.c +++ b/lib/sbi/openapi/model/cnf_unit.c @@ -93,7 +93,6 @@ OpenAPI_cnf_unit_t *OpenAPI_cnf_unit_parseFromJSON(cJSON *cnf_unitJSON) OpenAPI_atom_t *cnf_unitItem = OpenAPI_atom_parseFromJSON(cnf_unit_local); if (!cnf_unitItem) { ogs_error("No cnf_unitItem"); - OpenAPI_list_free(cnf_unitList); goto end; } OpenAPI_list_add(cnf_unitList, cnf_unitItem); diff --git a/lib/sbi/openapi/model/communication_characteristics.c b/lib/sbi/openapi/model/communication_characteristics.c index 2fc002f73..a4039a725 100644 --- a/lib/sbi/openapi/model/communication_characteristics.c +++ b/lib/sbi/openapi/model/communication_characteristics.c @@ -163,11 +163,19 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_p pp_subs_reg_timer = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppSubsRegTimer"); if (pp_subs_reg_timer) { pp_subs_reg_timer_local_nonprim = OpenAPI_pp_subs_reg_timer_parseFromJSON(pp_subs_reg_timer); + if (!pp_subs_reg_timer_local_nonprim) { + ogs_error("OpenAPI_pp_subs_reg_timer_parseFromJSON failed [pp_subs_reg_timer]"); + goto end; + } } pp_active_time = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppActiveTime"); if (pp_active_time) { pp_active_time_local_nonprim = OpenAPI_pp_active_time_parseFromJSON(pp_active_time); + if (!pp_active_time_local_nonprim) { + ogs_error("OpenAPI_pp_active_time_parseFromJSON failed [pp_active_time]"); + goto end; + } } pp_dl_packet_count = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppDlPacketCount"); @@ -181,16 +189,28 @@ OpenAPI_communication_characteristics_t *OpenAPI_communication_characteristics_p pp_dl_packet_count_ext = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppDlPacketCountExt"); if (pp_dl_packet_count_ext) { pp_dl_packet_count_ext_local_nonprim = OpenAPI_pp_dl_packet_count_ext_parseFromJSON(pp_dl_packet_count_ext); + if (!pp_dl_packet_count_ext_local_nonprim) { + ogs_error("OpenAPI_pp_dl_packet_count_ext_parseFromJSON failed [pp_dl_packet_count_ext]"); + goto end; + } } pp_maximum_response_time = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppMaximumResponseTime"); if (pp_maximum_response_time) { pp_maximum_response_time_local_nonprim = OpenAPI_pp_maximum_response_time_parseFromJSON(pp_maximum_response_time); + if (!pp_maximum_response_time_local_nonprim) { + ogs_error("OpenAPI_pp_maximum_response_time_parseFromJSON failed [pp_maximum_response_time]"); + goto end; + } } pp_maximum_latency = cJSON_GetObjectItemCaseSensitive(communication_characteristicsJSON, "ppMaximumLatency"); if (pp_maximum_latency) { pp_maximum_latency_local_nonprim = OpenAPI_pp_maximum_latency_parseFromJSON(pp_maximum_latency); + if (!pp_maximum_latency_local_nonprim) { + ogs_error("OpenAPI_pp_maximum_latency_parseFromJSON failed [pp_maximum_latency]"); + goto end; + } } communication_characteristics_local_var = OpenAPI_communication_characteristics_create ( diff --git a/lib/sbi/openapi/model/complex_query.c b/lib/sbi/openapi/model/complex_query.c index 04f10febd..00c523395 100644 --- a/lib/sbi/openapi/model/complex_query.c +++ b/lib/sbi/openapi/model/complex_query.c @@ -122,7 +122,6 @@ OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_quer OpenAPI_cnf_unit_t *cnf_unitsItem = OpenAPI_cnf_unit_parseFromJSON(cnf_units_local); if (!cnf_unitsItem) { ogs_error("No cnf_unitsItem"); - OpenAPI_list_free(cnf_unitsList); goto end; } OpenAPI_list_add(cnf_unitsList, cnf_unitsItem); @@ -149,7 +148,6 @@ OpenAPI_complex_query_t *OpenAPI_complex_query_parseFromJSON(cJSON *complex_quer OpenAPI_dnf_unit_t *dnf_unitsItem = OpenAPI_dnf_unit_parseFromJSON(dnf_units_local); if (!dnf_unitsItem) { ogs_error("No dnf_unitsItem"); - OpenAPI_list_free(dnf_unitsList); goto end; } OpenAPI_list_add(dnf_unitsList, dnf_unitsItem); diff --git a/lib/sbi/openapi/model/configured_snssai.c b/lib/sbi/openapi/model/configured_snssai.c index cfbb6115c..11c34baa4 100644 --- a/lib/sbi/openapi/model/configured_snssai.c +++ b/lib/sbi/openapi/model/configured_snssai.c @@ -93,10 +93,18 @@ OpenAPI_configured_snssai_t *OpenAPI_configured_snssai_parseFromJSON(cJSON *conf goto end; } configured_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(configured_snssai); + if (!configured_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [configured_snssai]"); + goto end; + } mapped_home_snssai = cJSON_GetObjectItemCaseSensitive(configured_snssaiJSON, "mappedHomeSnssai"); if (mapped_home_snssai) { mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai); + if (!mapped_home_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [mapped_home_snssai]"); + goto end; + } } configured_snssai_local_var = OpenAPI_configured_snssai_create ( diff --git a/lib/sbi/openapi/model/confirmation_data_response.c b/lib/sbi/openapi/model/confirmation_data_response.c index 16eeb27a7..e867e94cc 100644 --- a/lib/sbi/openapi/model/confirmation_data_response.c +++ b/lib/sbi/openapi/model/confirmation_data_response.c @@ -156,7 +156,6 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFr OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local); if (!pvs_infoItem) { ogs_error("No pvs_infoItem"); - OpenAPI_list_free(pvs_infoList); goto end; } OpenAPI_list_add(pvs_infoList, pvs_infoItem); diff --git a/lib/sbi/openapi/model/congestion_info.c b/lib/sbi/openapi/model/congestion_info.c index b808ed987..163198bb6 100644 --- a/lib/sbi/openapi/model/congestion_info.c +++ b/lib/sbi/openapi/model/congestion_info.c @@ -184,6 +184,10 @@ OpenAPI_congestion_info_t *OpenAPI_congestion_info_parseFromJSON(cJSON *congesti goto end; } cong_type_local_nonprim = OpenAPI_congestion_type_parseFromJSON(cong_type); + if (!cong_type_local_nonprim) { + ogs_error("OpenAPI_congestion_type_parseFromJSON failed [cong_type]"); + goto end; + } time_intev = cJSON_GetObjectItemCaseSensitive(congestion_infoJSON, "timeIntev"); if (!time_intev) { @@ -191,6 +195,10 @@ OpenAPI_congestion_info_t *OpenAPI_congestion_info_parseFromJSON(cJSON *congesti goto end; } time_intev_local_nonprim = OpenAPI_time_window_parseFromJSON(time_intev); + if (!time_intev_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [time_intev]"); + goto end; + } nsi = cJSON_GetObjectItemCaseSensitive(congestion_infoJSON, "nsi"); if (!nsi) { @@ -198,6 +206,10 @@ OpenAPI_congestion_info_t *OpenAPI_congestion_info_parseFromJSON(cJSON *congesti goto end; } nsi_local_nonprim = OpenAPI_threshold_level_parseFromJSON(nsi); + if (!nsi_local_nonprim) { + ogs_error("OpenAPI_threshold_level_parseFromJSON failed [nsi]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(congestion_infoJSON, "confidence"); if (confidence) { @@ -225,7 +237,6 @@ OpenAPI_congestion_info_t *OpenAPI_congestion_info_parseFromJSON(cJSON *congesti OpenAPI_top_application_t *top_app_list_ulItem = OpenAPI_top_application_parseFromJSON(top_app_list_ul_local); if (!top_app_list_ulItem) { ogs_error("No top_app_list_ulItem"); - OpenAPI_list_free(top_app_list_ulList); goto end; } OpenAPI_list_add(top_app_list_ulList, top_app_list_ulItem); @@ -250,7 +261,6 @@ OpenAPI_congestion_info_t *OpenAPI_congestion_info_parseFromJSON(cJSON *congesti OpenAPI_top_application_t *top_app_list_dlItem = OpenAPI_top_application_parseFromJSON(top_app_list_dl_local); if (!top_app_list_dlItem) { ogs_error("No top_app_list_dlItem"); - OpenAPI_list_free(top_app_list_dlList); goto end; } OpenAPI_list_add(top_app_list_dlList, top_app_list_dlItem); diff --git a/lib/sbi/openapi/model/consumer_nf_information.c b/lib/sbi/openapi/model/consumer_nf_information.c index 9abbe50b6..2ff4c6c1a 100644 --- a/lib/sbi/openapi/model/consumer_nf_information.c +++ b/lib/sbi/openapi/model/consumer_nf_information.c @@ -132,7 +132,6 @@ OpenAPI_consumer_nf_information_t *OpenAPI_consumer_nf_information_parseFromJSON OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); diff --git a/lib/sbi/openapi/model/context_data_sets.c b/lib/sbi/openapi/model/context_data_sets.c index 6b2c19691..229a9fc24 100644 --- a/lib/sbi/openapi/model/context_data_sets.c +++ b/lib/sbi/openapi/model/context_data_sets.c @@ -301,11 +301,19 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont amf3_gpp = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "amf3Gpp"); if (amf3_gpp) { amf3_gpp_local_nonprim = OpenAPI_amf3_gpp_access_registration_parseFromJSON(amf3_gpp); + if (!amf3_gpp_local_nonprim) { + ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON failed [amf3_gpp]"); + goto end; + } } amf_non3_gpp = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "amfNon3Gpp"); if (amf_non3_gpp) { amf_non3_gpp_local_nonprim = OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(amf_non3_gpp); + if (!amf_non3_gpp_local_nonprim) { + ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON failed [amf_non3_gpp]"); + goto end; + } } sdm_subscriptions = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "sdmSubscriptions"); @@ -326,7 +334,6 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont OpenAPI_sdm_subscription_t *sdm_subscriptionsItem = OpenAPI_sdm_subscription_parseFromJSON(sdm_subscriptions_local); if (!sdm_subscriptionsItem) { ogs_error("No sdm_subscriptionsItem"); - OpenAPI_list_free(sdm_subscriptionsList); goto end; } OpenAPI_list_add(sdm_subscriptionsList, sdm_subscriptionsItem); @@ -351,7 +358,6 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont OpenAPI_ee_subscription_t *ee_subscriptionsItem = OpenAPI_ee_subscription_parseFromJSON(ee_subscriptions_local); if (!ee_subscriptionsItem) { ogs_error("No ee_subscriptionsItem"); - OpenAPI_list_free(ee_subscriptionsList); goto end; } OpenAPI_list_add(ee_subscriptionsList, ee_subscriptionsItem); @@ -361,11 +367,19 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont smsf3_gpp_access = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "smsf3GppAccess"); if (smsf3_gpp_access) { smsf3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp_access); + if (!smsf3_gpp_access_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf3_gpp_access]"); + goto end; + } } smsf_non3_gpp_access = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "smsfNon3GppAccess"); if (smsf_non3_gpp_access) { smsf_non3_gpp_access_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf_non3_gpp_access); + if (!smsf_non3_gpp_access_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf_non3_gpp_access]"); + goto end; + } } subscription_data_subscriptions = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "subscriptionDataSubscriptions"); @@ -386,7 +400,6 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local); if (!subscription_data_subscriptionsItem) { ogs_error("No subscription_data_subscriptionsItem"); - OpenAPI_list_free(subscription_data_subscriptionsList); goto end; } OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem); @@ -411,7 +424,6 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont OpenAPI_smf_registration_t *smf_registrationsItem = OpenAPI_smf_registration_parseFromJSON(smf_registrations_local); if (!smf_registrationsItem) { ogs_error("No smf_registrationsItem"); - OpenAPI_list_free(smf_registrationsList); goto end; } OpenAPI_list_add(smf_registrationsList, smf_registrationsItem); @@ -421,16 +433,28 @@ OpenAPI_context_data_sets_t *OpenAPI_context_data_sets_parseFromJSON(cJSON *cont ip_sm_gw = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "ipSmGw"); if (ip_sm_gw) { ip_sm_gw_local_nonprim = OpenAPI_ip_sm_gw_registration_parseFromJSON(ip_sm_gw); + if (!ip_sm_gw_local_nonprim) { + ogs_error("OpenAPI_ip_sm_gw_registration_parseFromJSON failed [ip_sm_gw]"); + goto end; + } } roaming_info = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "roamingInfo"); if (roaming_info) { roaming_info_local_nonprim = OpenAPI_roaming_info_update_parseFromJSON(roaming_info); + if (!roaming_info_local_nonprim) { + ogs_error("OpenAPI_roaming_info_update_parseFromJSON failed [roaming_info]"); + goto end; + } } pei_info = cJSON_GetObjectItemCaseSensitive(context_data_setsJSON, "peiInfo"); if (pei_info) { pei_info_local_nonprim = OpenAPI_pei_update_info_parseFromJSON(pei_info); + if (!pei_info_local_nonprim) { + ogs_error("OpenAPI_pei_update_info_parseFromJSON failed [pei_info]"); + goto end; + } } context_data_sets_local_var = OpenAPI_context_data_sets_create ( diff --git a/lib/sbi/openapi/model/create_ue_context_201_response.c b/lib/sbi/openapi/model/create_ue_context_201_response.c index bc9a440b5..202925ff2 100644 --- a/lib/sbi/openapi/model/create_ue_context_201_response.c +++ b/lib/sbi/openapi/model/create_ue_context_201_response.c @@ -339,6 +339,10 @@ OpenAPI_create_ue_context_201_response_t *OpenAPI_create_ue_context_201_response json_data = cJSON_GetObjectItemCaseSensitive(create_ue_context_201_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_created_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_created_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(create_ue_context_201_responseJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/create_ue_context_403_response.c b/lib/sbi/openapi/model/create_ue_context_403_response.c index ff4ad5e7a..5b8c196e3 100644 --- a/lib/sbi/openapi/model/create_ue_context_403_response.c +++ b/lib/sbi/openapi/model/create_ue_context_403_response.c @@ -84,6 +84,10 @@ OpenAPI_create_ue_context_403_response_t *OpenAPI_create_ue_context_403_response json_data = cJSON_GetObjectItemCaseSensitive(create_ue_context_403_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_create_error_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_create_error_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(create_ue_context_403_responseJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/create_ue_context_request.c b/lib/sbi/openapi/model/create_ue_context_request.c index 69d1d9bdc..98a459eaf 100644 --- a/lib/sbi/openapi/model/create_ue_context_request.c +++ b/lib/sbi/openapi/model/create_ue_context_request.c @@ -373,6 +373,10 @@ OpenAPI_create_ue_context_request_t *OpenAPI_create_ue_context_request_parseFrom json_data = cJSON_GetObjectItemCaseSensitive(create_ue_context_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_create_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_create_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(create_ue_context_requestJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/data_change_notify.c b/lib/sbi/openapi/model/data_change_notify.c index 69619c3e7..fe41f139a 100644 --- a/lib/sbi/openapi/model/data_change_notify.c +++ b/lib/sbi/openapi/model/data_change_notify.c @@ -231,7 +231,6 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da OpenAPI_notify_item_t *notify_itemsItem = OpenAPI_notify_item_parseFromJSON(notify_items_local); if (!notify_itemsItem) { ogs_error("No notify_itemsItem"); - OpenAPI_list_free(notify_itemsList); goto end; } OpenAPI_list_add(notify_itemsList, notify_itemsItem); @@ -241,6 +240,10 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da sdm_subscription = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "sdmSubscription"); if (sdm_subscription) { sdm_subscription_local_nonprim = OpenAPI_sdm_subscription_1_parseFromJSON(sdm_subscription); + if (!sdm_subscription_local_nonprim) { + ogs_error("OpenAPI_sdm_subscription_1_parseFromJSON failed [sdm_subscription]"); + goto end; + } } additional_sdm_subscriptions = cJSON_GetObjectItemCaseSensitive(data_change_notifyJSON, "additionalSdmSubscriptions"); @@ -261,7 +264,6 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da OpenAPI_sdm_subscription_1_t *additional_sdm_subscriptionsItem = OpenAPI_sdm_subscription_1_parseFromJSON(additional_sdm_subscriptions_local); if (!additional_sdm_subscriptionsItem) { ogs_error("No additional_sdm_subscriptionsItem"); - OpenAPI_list_free(additional_sdm_subscriptionsList); goto end; } OpenAPI_list_add(additional_sdm_subscriptionsList, additional_sdm_subscriptionsItem); @@ -286,7 +288,6 @@ OpenAPI_data_change_notify_t *OpenAPI_data_change_notify_parseFromJSON(cJSON *da OpenAPI_subscription_data_subscriptions_t *subscription_data_subscriptionsItem = OpenAPI_subscription_data_subscriptions_parseFromJSON(subscription_data_subscriptions_local); if (!subscription_data_subscriptionsItem) { ogs_error("No subscription_data_subscriptionsItem"); - OpenAPI_list_free(subscription_data_subscriptionsList); goto end; } OpenAPI_list_add(subscription_data_subscriptionsList, subscription_data_subscriptionsItem); diff --git a/lib/sbi/openapi/model/data_filter.c b/lib/sbi/openapi/model/data_filter.c index 0275ccf90..864a24ab6 100644 --- a/lib/sbi/openapi/model/data_filter.c +++ b/lib/sbi/openapi/model/data_filter.c @@ -313,6 +313,10 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON) goto end; } data_ind_local_nonprim = OpenAPI_data_ind_parseFromJSON(data_ind); + if (!data_ind_local_nonprim) { + ogs_error("OpenAPI_data_ind_parseFromJSON failed [data_ind]"); + goto end; + } dnns = cJSON_GetObjectItemCaseSensitive(data_filterJSON, "dnns"); if (dnns) { @@ -353,7 +357,6 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON) OpenAPI_snssai_t *snssaisItem = OpenAPI_snssai_parseFromJSON(snssais_local); if (!snssaisItem) { ogs_error("No snssaisItem"); - OpenAPI_list_free(snssaisList); goto end; } OpenAPI_list_add(snssaisList, snssaisItem); @@ -512,7 +515,6 @@ OpenAPI_data_filter_t *OpenAPI_data_filter_parseFromJSON(cJSON *data_filterJSON) OpenAPI_dnn_snssai_information_t *dnn_snssai_infosItem = OpenAPI_dnn_snssai_information_parseFromJSON(dnn_snssai_infos_local); if (!dnn_snssai_infosItem) { ogs_error("No dnn_snssai_infosItem"); - OpenAPI_list_free(dnn_snssai_infosList); goto end; } OpenAPI_list_add(dnn_snssai_infosList, dnn_snssai_infosItem); diff --git a/lib/sbi/openapi/model/data_restoration_notification.c b/lib/sbi/openapi/model/data_restoration_notification.c index e20e83d84..94677c30c 100644 --- a/lib/sbi/openapi/model/data_restoration_notification.c +++ b/lib/sbi/openapi/model/data_restoration_notification.c @@ -256,6 +256,10 @@ OpenAPI_data_restoration_notification_t *OpenAPI_data_restoration_notification_p plmn_id = cJSON_GetObjectItemCaseSensitive(data_restoration_notificationJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } supi_ranges = cJSON_GetObjectItemCaseSensitive(data_restoration_notificationJSON, "supiRanges"); @@ -276,7 +280,6 @@ OpenAPI_data_restoration_notification_t *OpenAPI_data_restoration_notification_p OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -301,7 +304,6 @@ OpenAPI_data_restoration_notification_t *OpenAPI_data_restoration_notification_p OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -347,7 +349,6 @@ OpenAPI_data_restoration_notification_t *OpenAPI_data_restoration_notification_p OpenAPI_snssai_t *s_nssai_listItem = OpenAPI_snssai_parseFromJSON(s_nssai_list_local); if (!s_nssai_listItem) { ogs_error("No s_nssai_listItem"); - OpenAPI_list_free(s_nssai_listList); goto end; } OpenAPI_list_add(s_nssai_listList, s_nssai_listItem); diff --git a/lib/sbi/openapi/model/datalink_reporting_configuration.c b/lib/sbi/openapi/model/datalink_reporting_configuration.c index d0109919d..fc62f495b 100644 --- a/lib/sbi/openapi/model/datalink_reporting_configuration.c +++ b/lib/sbi/openapi/model/datalink_reporting_configuration.c @@ -145,7 +145,6 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_desItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_des_local); if (!ddd_traffic_desItem) { ogs_error("No ddd_traffic_desItem"); - OpenAPI_list_free(ddd_traffic_desList); goto end; } OpenAPI_list_add(ddd_traffic_desList, ddd_traffic_desItem); @@ -163,6 +162,10 @@ OpenAPI_datalink_reporting_configuration_t *OpenAPI_datalink_reporting_configura slice = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "slice"); if (slice) { slice_local_nonprim = OpenAPI_snssai_parseFromJSON(slice); + if (!slice_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [slice]"); + goto end; + } } ddd_status_list = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configurationJSON, "dddStatusList"); diff --git a/lib/sbi/openapi/model/datalink_reporting_configuration_1.c b/lib/sbi/openapi/model/datalink_reporting_configuration_1.c index a64d14e89..369661d80 100644 --- a/lib/sbi/openapi/model/datalink_reporting_configuration_1.c +++ b/lib/sbi/openapi/model/datalink_reporting_configuration_1.c @@ -145,7 +145,6 @@ OpenAPI_datalink_reporting_configuration_1_t *OpenAPI_datalink_reporting_configu OpenAPI_ddd_traffic_descriptor_1_t *ddd_traffic_desItem = OpenAPI_ddd_traffic_descriptor_1_parseFromJSON(ddd_traffic_des_local); if (!ddd_traffic_desItem) { ogs_error("No ddd_traffic_desItem"); - OpenAPI_list_free(ddd_traffic_desList); goto end; } OpenAPI_list_add(ddd_traffic_desList, ddd_traffic_desItem); @@ -163,6 +162,10 @@ OpenAPI_datalink_reporting_configuration_1_t *OpenAPI_datalink_reporting_configu slice = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configuration_1JSON, "slice"); if (slice) { slice_local_nonprim = OpenAPI_snssai_parseFromJSON(slice); + if (!slice_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [slice]"); + goto end; + } } ddd_status_list = cJSON_GetObjectItemCaseSensitive(datalink_reporting_configuration_1JSON, "dddStatusList"); diff --git a/lib/sbi/openapi/model/dccf_cond.c b/lib/sbi/openapi/model/dccf_cond.c index 08344f0e5..37d168bb4 100644 --- a/lib/sbi/openapi/model/dccf_cond.c +++ b/lib/sbi/openapi/model/dccf_cond.c @@ -209,7 +209,6 @@ OpenAPI_dccf_cond_t *OpenAPI_dccf_cond_parseFromJSON(cJSON *dccf_condJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -234,7 +233,6 @@ OpenAPI_dccf_cond_t *OpenAPI_dccf_cond_parseFromJSON(cJSON *dccf_condJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/dccf_info.c b/lib/sbi/openapi/model/dccf_info.c index 6196b5896..ffc169d5e 100644 --- a/lib/sbi/openapi/model/dccf_info.c +++ b/lib/sbi/openapi/model/dccf_info.c @@ -202,7 +202,6 @@ OpenAPI_dccf_info_t *OpenAPI_dccf_info_parseFromJSON(cJSON *dccf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -227,7 +226,6 @@ OpenAPI_dccf_info_t *OpenAPI_dccf_info_parseFromJSON(cJSON *dccf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/ddn_failure_sub_info.c b/lib/sbi/openapi/model/ddn_failure_sub_info.c index a134c38f5..3a65be0bc 100644 --- a/lib/sbi/openapi/model/ddn_failure_sub_info.c +++ b/lib/sbi/openapi/model/ddn_failure_sub_info.c @@ -114,7 +114,6 @@ OpenAPI_ddn_failure_sub_info_t *OpenAPI_ddn_failure_sub_info_parseFromJSON(cJSON OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local); if (!ddd_traffic_descriptor_listItem) { ogs_error("No ddd_traffic_descriptor_listItem"); - OpenAPI_list_free(ddd_traffic_descriptor_listList); goto end; } OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem); diff --git a/lib/sbi/openapi/model/ddn_failure_subs.c b/lib/sbi/openapi/model/ddn_failure_subs.c index f98cc343c..286f0b9dd 100644 --- a/lib/sbi/openapi/model/ddn_failure_subs.c +++ b/lib/sbi/openapi/model/ddn_failure_subs.c @@ -108,7 +108,6 @@ OpenAPI_ddn_failure_subs_t *OpenAPI_ddn_failure_subs_parseFromJSON(cJSON *ddn_fa OpenAPI_ddn_failure_sub_info_t *ddn_failure_subs_info_listItem = OpenAPI_ddn_failure_sub_info_parseFromJSON(ddn_failure_subs_info_list_local); if (!ddn_failure_subs_info_listItem) { ogs_error("No ddn_failure_subs_info_listItem"); - OpenAPI_list_free(ddn_failure_subs_info_listList); goto end; } OpenAPI_list_add(ddn_failure_subs_info_listList, ddn_failure_subs_info_listItem); diff --git a/lib/sbi/openapi/model/default_unrelated_class.c b/lib/sbi/openapi/model/default_unrelated_class.c index f92b84f8f..730d47c80 100644 --- a/lib/sbi/openapi/model/default_unrelated_class.c +++ b/lib/sbi/openapi/model/default_unrelated_class.c @@ -156,7 +156,6 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_parseFromJSON OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local); if (!allowed_geographic_areaItem) { ogs_error("No allowed_geographic_areaItem"); - OpenAPI_list_free(allowed_geographic_areaList); goto end; } OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem); @@ -184,6 +183,10 @@ OpenAPI_default_unrelated_class_t *OpenAPI_default_unrelated_class_parseFromJSON valid_time_period = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } code_word_list = cJSON_GetObjectItemCaseSensitive(default_unrelated_classJSON, "codeWordList"); diff --git a/lib/sbi/openapi/model/dispersion_area.c b/lib/sbi/openapi/model/dispersion_area.c index e6325f349..a77fc787f 100644 --- a/lib/sbi/openapi/model/dispersion_area.c +++ b/lib/sbi/openapi/model/dispersion_area.c @@ -154,7 +154,6 @@ OpenAPI_dispersion_area_t *OpenAPI_dispersion_area_parseFromJSON(cJSON *dispersi OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -179,7 +178,6 @@ OpenAPI_dispersion_area_t *OpenAPI_dispersion_area_parseFromJSON(cJSON *dispersi OpenAPI_ncgi_t *ncgi_listItem = OpenAPI_ncgi_parseFromJSON(ncgi_list_local); if (!ncgi_listItem) { ogs_error("No ncgi_listItem"); - OpenAPI_list_free(ncgi_listList); goto end; } OpenAPI_list_add(ncgi_listList, ncgi_listItem); @@ -204,7 +202,6 @@ OpenAPI_dispersion_area_t *OpenAPI_dispersion_area_parseFromJSON(cJSON *dispersi OpenAPI_ecgi_t *ecgi_listItem = OpenAPI_ecgi_parseFromJSON(ecgi_list_local); if (!ecgi_listItem) { ogs_error("No ecgi_listItem"); - OpenAPI_list_free(ecgi_listList); goto end; } OpenAPI_list_add(ecgi_listList, ecgi_listItem); diff --git a/lib/sbi/openapi/model/dispersion_collection.c b/lib/sbi/openapi/model/dispersion_collection.c index 122384049..928fbf278 100644 --- a/lib/sbi/openapi/model/dispersion_collection.c +++ b/lib/sbi/openapi/model/dispersion_collection.c @@ -246,11 +246,19 @@ OpenAPI_dispersion_collection_t *OpenAPI_dispersion_collection_parseFromJSON(cJS ue_loc = cJSON_GetObjectItemCaseSensitive(dispersion_collectionJSON, "ueLoc"); if (ue_loc) { ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc); + if (!ue_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_loc]"); + goto end; + } } snssai = cJSON_GetObjectItemCaseSensitive(dispersion_collectionJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } supis = cJSON_GetObjectItemCaseSensitive(dispersion_collectionJSON, "supis"); @@ -313,7 +321,6 @@ OpenAPI_dispersion_collection_t *OpenAPI_dispersion_collection_parseFromJSON(cJS OpenAPI_application_volume_t *app_volumesItem = OpenAPI_application_volume_parseFromJSON(app_volumes_local); if (!app_volumesItem) { ogs_error("No app_volumesItem"); - OpenAPI_list_free(app_volumesList); goto end; } OpenAPI_list_add(app_volumesList, app_volumesItem); @@ -331,6 +338,10 @@ OpenAPI_dispersion_collection_t *OpenAPI_dispersion_collection_parseFromJSON(cJS disper_class = cJSON_GetObjectItemCaseSensitive(dispersion_collectionJSON, "disperClass"); if (disper_class) { disper_class_local_nonprim = OpenAPI_dispersion_class_parseFromJSON(disper_class); + if (!disper_class_local_nonprim) { + ogs_error("OpenAPI_dispersion_class_parseFromJSON failed [disper_class]"); + goto end; + } } usage_rank = cJSON_GetObjectItemCaseSensitive(dispersion_collectionJSON, "usageRank"); diff --git a/lib/sbi/openapi/model/dispersion_info.c b/lib/sbi/openapi/model/dispersion_info.c index d0ac563b4..7cdef4bba 100644 --- a/lib/sbi/openapi/model/dispersion_info.c +++ b/lib/sbi/openapi/model/dispersion_info.c @@ -160,7 +160,6 @@ OpenAPI_dispersion_info_t *OpenAPI_dispersion_info_parseFromJSON(cJSON *dispersi OpenAPI_dispersion_collection_t *disper_collectsItem = OpenAPI_dispersion_collection_parseFromJSON(disper_collects_local); if (!disper_collectsItem) { ogs_error("No disper_collectsItem"); - OpenAPI_list_free(disper_collectsList); goto end; } OpenAPI_list_add(disper_collectsList, disper_collectsItem); @@ -172,6 +171,10 @@ OpenAPI_dispersion_info_t *OpenAPI_dispersion_info_parseFromJSON(cJSON *dispersi goto end; } disper_type_local_nonprim = OpenAPI_dispersion_type_parseFromJSON(disper_type); + if (!disper_type_local_nonprim) { + ogs_error("OpenAPI_dispersion_type_parseFromJSON failed [disper_type]"); + goto end; + } dispersion_info_local_var = OpenAPI_dispersion_info_create ( ogs_strdup(ts_start->valuestring), diff --git a/lib/sbi/openapi/model/dispersion_requirement.c b/lib/sbi/openapi/model/dispersion_requirement.c index 36714a6a3..1c55a4d4e 100644 --- a/lib/sbi/openapi/model/dispersion_requirement.c +++ b/lib/sbi/openapi/model/dispersion_requirement.c @@ -168,6 +168,10 @@ OpenAPI_dispersion_requirement_t *OpenAPI_dispersion_requirement_parseFromJSON(c goto end; } disper_type_local_nonprim = OpenAPI_dispersion_type_parseFromJSON(disper_type); + if (!disper_type_local_nonprim) { + ogs_error("OpenAPI_dispersion_type_parseFromJSON failed [disper_type]"); + goto end; + } class_criters = cJSON_GetObjectItemCaseSensitive(dispersion_requirementJSON, "classCriters"); if (class_criters) { @@ -187,7 +191,6 @@ OpenAPI_dispersion_requirement_t *OpenAPI_dispersion_requirement_parseFromJSON(c OpenAPI_class_criterion_t *class_critersItem = OpenAPI_class_criterion_parseFromJSON(class_criters_local); if (!class_critersItem) { ogs_error("No class_critersItem"); - OpenAPI_list_free(class_critersList); goto end; } OpenAPI_list_add(class_critersList, class_critersItem); @@ -212,7 +215,6 @@ OpenAPI_dispersion_requirement_t *OpenAPI_dispersion_requirement_parseFromJSON(c OpenAPI_ranking_criterion_t *rank_critersItem = OpenAPI_ranking_criterion_parseFromJSON(rank_criters_local); if (!rank_critersItem) { ogs_error("No rank_critersItem"); - OpenAPI_list_free(rank_critersList); goto end; } OpenAPI_list_add(rank_critersList, rank_critersItem); @@ -222,11 +224,19 @@ OpenAPI_dispersion_requirement_t *OpenAPI_dispersion_requirement_parseFromJSON(c disp_order_criter = cJSON_GetObjectItemCaseSensitive(dispersion_requirementJSON, "dispOrderCriter"); if (disp_order_criter) { disp_order_criter_local_nonprim = OpenAPI_dispersion_ordering_criterion_parseFromJSON(disp_order_criter); + if (!disp_order_criter_local_nonprim) { + ogs_error("OpenAPI_dispersion_ordering_criterion_parseFromJSON failed [disp_order_criter]"); + goto end; + } } order = cJSON_GetObjectItemCaseSensitive(dispersion_requirementJSON, "order"); if (order) { order_local_nonprim = OpenAPI_matching_direction_parseFromJSON(order); + if (!order_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [order]"); + goto end; + } } dispersion_requirement_local_var = OpenAPI_dispersion_requirement_create ( diff --git a/lib/sbi/openapi/model/dn_perf.c b/lib/sbi/openapi/model/dn_perf.c index 592844e18..12434d1b6 100644 --- a/lib/sbi/openapi/model/dn_perf.c +++ b/lib/sbi/openapi/model/dn_perf.c @@ -167,11 +167,19 @@ OpenAPI_dn_perf_t *OpenAPI_dn_perf_parseFromJSON(cJSON *dn_perfJSON) app_server_ins_addr = cJSON_GetObjectItemCaseSensitive(dn_perfJSON, "appServerInsAddr"); if (app_server_ins_addr) { app_server_ins_addr_local_nonprim = OpenAPI_addr_fqdn_parseFromJSON(app_server_ins_addr); + if (!app_server_ins_addr_local_nonprim) { + ogs_error("OpenAPI_addr_fqdn_parseFromJSON failed [app_server_ins_addr]"); + goto end; + } } upf_info = cJSON_GetObjectItemCaseSensitive(dn_perfJSON, "upfInfo"); if (upf_info) { upf_info_local_nonprim = OpenAPI_upf_information_parseFromJSON(upf_info); + if (!upf_info_local_nonprim) { + ogs_error("OpenAPI_upf_information_parseFromJSON failed [upf_info]"); + goto end; + } } dnai = cJSON_GetObjectItemCaseSensitive(dn_perfJSON, "dnai"); @@ -188,15 +196,27 @@ OpenAPI_dn_perf_t *OpenAPI_dn_perf_parseFromJSON(cJSON *dn_perfJSON) goto end; } perf_data_local_nonprim = OpenAPI_perf_data_parseFromJSON(perf_data); + if (!perf_data_local_nonprim) { + ogs_error("OpenAPI_perf_data_parseFromJSON failed [perf_data]"); + goto end; + } spatial_valid_con = cJSON_GetObjectItemCaseSensitive(dn_perfJSON, "spatialValidCon"); if (spatial_valid_con) { spatial_valid_con_local_nonprim = OpenAPI_network_area_info_parseFromJSON(spatial_valid_con); + if (!spatial_valid_con_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [spatial_valid_con]"); + goto end; + } } temporal_valid_con = cJSON_GetObjectItemCaseSensitive(dn_perfJSON, "temporalValidCon"); if (temporal_valid_con) { temporal_valid_con_local_nonprim = OpenAPI_time_window_parseFromJSON(temporal_valid_con); + if (!temporal_valid_con_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [temporal_valid_con]"); + goto end; + } } dn_perf_local_var = OpenAPI_dn_perf_create ( diff --git a/lib/sbi/openapi/model/dn_perf_info.c b/lib/sbi/openapi/model/dn_perf_info.c index ed65a3351..badf10101 100644 --- a/lib/sbi/openapi/model/dn_perf_info.c +++ b/lib/sbi/openapi/model/dn_perf_info.c @@ -152,6 +152,10 @@ OpenAPI_dn_perf_info_t *OpenAPI_dn_perf_info_parseFromJSON(cJSON *dn_perf_infoJS snssai = cJSON_GetObjectItemCaseSensitive(dn_perf_infoJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } dn_perf = cJSON_GetObjectItemCaseSensitive(dn_perf_infoJSON, "dnPerf"); @@ -175,7 +179,6 @@ OpenAPI_dn_perf_info_t *OpenAPI_dn_perf_info_parseFromJSON(cJSON *dn_perf_infoJS OpenAPI_dn_perf_t *dn_perfItem = OpenAPI_dn_perf_parseFromJSON(dn_perf_local); if (!dn_perfItem) { ogs_error("No dn_perfItem"); - OpenAPI_list_free(dn_perfList); goto end; } OpenAPI_list_add(dn_perfList, dn_perfItem); diff --git a/lib/sbi/openapi/model/dn_performance_req.c b/lib/sbi/openapi/model/dn_performance_req.c index fa0122d1e..9eee6e582 100644 --- a/lib/sbi/openapi/model/dn_performance_req.c +++ b/lib/sbi/openapi/model/dn_performance_req.c @@ -115,11 +115,19 @@ OpenAPI_dn_performance_req_t *OpenAPI_dn_performance_req_parseFromJSON(cJSON *dn dn_perf_order_criter = cJSON_GetObjectItemCaseSensitive(dn_performance_reqJSON, "dnPerfOrderCriter"); if (dn_perf_order_criter) { dn_perf_order_criter_local_nonprim = OpenAPI_dn_perf_ordering_criterion_parseFromJSON(dn_perf_order_criter); + if (!dn_perf_order_criter_local_nonprim) { + ogs_error("OpenAPI_dn_perf_ordering_criterion_parseFromJSON failed [dn_perf_order_criter]"); + goto end; + } } order = cJSON_GetObjectItemCaseSensitive(dn_performance_reqJSON, "order"); if (order) { order_local_nonprim = OpenAPI_matching_direction_parseFromJSON(order); + if (!order_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [order]"); + goto end; + } } report_thresholds = cJSON_GetObjectItemCaseSensitive(dn_performance_reqJSON, "reportThresholds"); @@ -140,7 +148,6 @@ OpenAPI_dn_performance_req_t *OpenAPI_dn_performance_req_parseFromJSON(cJSON *dn OpenAPI_threshold_level_t *report_thresholdsItem = OpenAPI_threshold_level_parseFromJSON(report_thresholds_local); if (!report_thresholdsItem) { ogs_error("No report_thresholdsItem"); - OpenAPI_list_free(report_thresholdsList); goto end; } OpenAPI_list_add(report_thresholdsList, report_thresholdsItem); diff --git a/lib/sbi/openapi/model/dnf.c b/lib/sbi/openapi/model/dnf.c index 393ba85ee..70e049f77 100644 --- a/lib/sbi/openapi/model/dnf.c +++ b/lib/sbi/openapi/model/dnf.c @@ -93,7 +93,6 @@ OpenAPI_dnf_t *OpenAPI_dnf_parseFromJSON(cJSON *dnfJSON) OpenAPI_dnf_unit_t *dnf_unitsItem = OpenAPI_dnf_unit_parseFromJSON(dnf_units_local); if (!dnf_unitsItem) { ogs_error("No dnf_unitsItem"); - OpenAPI_list_free(dnf_unitsList); goto end; } OpenAPI_list_add(dnf_unitsList, dnf_unitsItem); diff --git a/lib/sbi/openapi/model/dnf_unit.c b/lib/sbi/openapi/model/dnf_unit.c index 4cf196554..b5e64c056 100644 --- a/lib/sbi/openapi/model/dnf_unit.c +++ b/lib/sbi/openapi/model/dnf_unit.c @@ -93,7 +93,6 @@ OpenAPI_dnf_unit_t *OpenAPI_dnf_unit_parseFromJSON(cJSON *dnf_unitJSON) OpenAPI_atom_t *dnf_unitItem = OpenAPI_atom_parseFromJSON(dnf_unit_local); if (!dnf_unitItem) { ogs_error("No dnf_unitItem"); - OpenAPI_list_free(dnf_unitList); goto end; } OpenAPI_list_add(dnf_unitList, dnf_unitItem); diff --git a/lib/sbi/openapi/model/dnn_configuration.c b/lib/sbi/openapi/model/dnn_configuration.c index 198b2d0db..6f0d85826 100644 --- a/lib/sbi/openapi/model/dnn_configuration.c +++ b/lib/sbi/openapi/model/dnn_configuration.c @@ -644,6 +644,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ goto end; } pdu_session_types_local_nonprim = OpenAPI_pdu_session_types_parseFromJSON(pdu_session_types); + if (!pdu_session_types_local_nonprim) { + ogs_error("OpenAPI_pdu_session_types_parseFromJSON failed [pdu_session_types]"); + goto end; + } ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "sscModes"); if (!ssc_modes) { @@ -651,6 +655,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ goto end; } ssc_modes_local_nonprim = OpenAPI_ssc_modes_parseFromJSON(ssc_modes); + if (!ssc_modes_local_nonprim) { + ogs_error("OpenAPI_ssc_modes_parseFromJSON failed [ssc_modes]"); + goto end; + } iwk_eps_ind = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "iwkEpsInd"); if (iwk_eps_ind) { @@ -663,11 +671,19 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ _5g_qos_profile = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "5gQosProfile"); if (_5g_qos_profile) { _5g_qos_profile_local_nonprim = OpenAPI_subscribed_default_qos_parseFromJSON(_5g_qos_profile); + if (!_5g_qos_profile_local_nonprim) { + ogs_error("OpenAPI_subscribed_default_qos_parseFromJSON failed [_5g_qos_profile]"); + goto end; + } } session_ambr = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } } _3gpp_charging_characteristics = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "3gppChargingCharacteristics"); @@ -696,7 +712,6 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ OpenAPI_ip_address_t *static_ip_addressItem = OpenAPI_ip_address_parseFromJSON(static_ip_address_local); if (!static_ip_addressItem) { ogs_error("No static_ip_addressItem"); - OpenAPI_list_free(static_ip_addressList); goto end; } OpenAPI_list_add(static_ip_addressList, static_ip_addressItem); @@ -706,6 +721,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ up_security = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "upSecurity"); if (up_security) { up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_parseFromJSON failed [up_security]"); + goto end; + } } pdu_session_continuity_ind = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "pduSessionContinuityInd"); @@ -728,6 +747,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ nidd_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "niddInfo"); if (nidd_info) { nidd_info_local_nonprim = OpenAPI_nidd_information_parseFromJSON(nidd_info); + if (!nidd_info_local_nonprim) { + ogs_error("OpenAPI_nidd_information_parseFromJSON failed [nidd_info]"); + goto end; + } } redundant_session_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "redundantSessionAllowed"); @@ -741,6 +764,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ acs_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "acsInfo"); if (acs_info) { acs_info_local_nonprim = OpenAPI_acs_info_parseFromJSON(acs_info); + if (!acs_info_local_nonprim) { + ogs_error("OpenAPI_acs_info_parseFromJSON failed [acs_info]"); + goto end; + } } ipv4_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ipv4FrameRouteList"); @@ -761,7 +788,6 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ OpenAPI_frame_route_info_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv4_frame_route_list_local); if (!ipv4_frame_route_listItem) { ogs_error("No ipv4_frame_route_listItem"); - OpenAPI_list_free(ipv4_frame_route_listList); goto end; } OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem); @@ -786,7 +812,6 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ OpenAPI_frame_route_info_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv6_frame_route_list_local); if (!ipv6_frame_route_listItem) { ogs_error("No ipv6_frame_route_listItem"); - OpenAPI_list_free(ipv6_frame_route_listList); goto end; } OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem); @@ -828,6 +853,10 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ dn_aaa_address = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "dnAaaAddress"); if (dn_aaa_address) { dn_aaa_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(dn_aaa_address); + if (!dn_aaa_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [dn_aaa_address]"); + goto end; + } } additional_dn_aaa_addresses = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "additionalDnAaaAddresses"); @@ -848,7 +877,6 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ OpenAPI_ip_address_t *additional_dn_aaa_addressesItem = OpenAPI_ip_address_parseFromJSON(additional_dn_aaa_addresses_local); if (!additional_dn_aaa_addressesItem) { ogs_error("No additional_dn_aaa_addressesItem"); - OpenAPI_list_free(additional_dn_aaa_addressesList); goto end; } OpenAPI_list_add(additional_dn_aaa_addressesList, additional_dn_aaa_addressesItem); @@ -874,16 +902,28 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ ipv4_index = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ipv4Index"); if (ipv4_index) { ipv4_index_local_nonprim = OpenAPI_ip_index_parseFromJSON(ipv4_index); + if (!ipv4_index_local_nonprim) { + ogs_error("OpenAPI_ip_index_parseFromJSON failed [ipv4_index]"); + goto end; + } } ipv6_index = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ipv6Index"); if (ipv6_index) { ipv6_index_local_nonprim = OpenAPI_ip_index_parseFromJSON(ipv6_index); + if (!ipv6_index_local_nonprim) { + ogs_error("OpenAPI_ip_index_parseFromJSON failed [ipv6_index]"); + goto end; + } } ecs_addr_config_info = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "ecsAddrConfigInfo"); if (ecs_addr_config_info) { ecs_addr_config_info_local_nonprim = OpenAPI_ecs_addr_config_info_parseFromJSON(ecs_addr_config_info); + if (!ecs_addr_config_info_local_nonprim) { + ogs_error("OpenAPI_ecs_addr_config_info_parseFromJSON failed [ecs_addr_config_info]"); + goto end; + } } additional_ecs_addr_config_infos = cJSON_GetObjectItemCaseSensitive(dnn_configurationJSON, "additionalEcsAddrConfigInfos"); @@ -904,7 +944,6 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_ OpenAPI_ecs_addr_config_info_t *additional_ecs_addr_config_infosItem = OpenAPI_ecs_addr_config_info_parseFromJSON(additional_ecs_addr_config_infos_local); if (!additional_ecs_addr_config_infosItem) { ogs_error("No additional_ecs_addr_config_infosItem"); - OpenAPI_list_free(additional_ecs_addr_config_infosList); goto end; } OpenAPI_list_add(additional_ecs_addr_config_infosList, additional_ecs_addr_config_infosItem); diff --git a/lib/sbi/openapi/model/dnn_configuration_1.c b/lib/sbi/openapi/model/dnn_configuration_1.c index 999437984..56e17021f 100644 --- a/lib/sbi/openapi/model/dnn_configuration_1.c +++ b/lib/sbi/openapi/model/dnn_configuration_1.c @@ -644,6 +644,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * goto end; } pdu_session_types_local_nonprim = OpenAPI_pdu_session_types_1_parseFromJSON(pdu_session_types); + if (!pdu_session_types_local_nonprim) { + ogs_error("OpenAPI_pdu_session_types_1_parseFromJSON failed [pdu_session_types]"); + goto end; + } ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "sscModes"); if (!ssc_modes) { @@ -651,6 +655,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * goto end; } ssc_modes_local_nonprim = OpenAPI_ssc_modes_1_parseFromJSON(ssc_modes); + if (!ssc_modes_local_nonprim) { + ogs_error("OpenAPI_ssc_modes_1_parseFromJSON failed [ssc_modes]"); + goto end; + } iwk_eps_ind = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "iwkEpsInd"); if (iwk_eps_ind) { @@ -663,11 +671,19 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * _5g_qos_profile = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "5gQosProfile"); if (_5g_qos_profile) { _5g_qos_profile_local_nonprim = OpenAPI_subscribed_default_qos_1_parseFromJSON(_5g_qos_profile); + if (!_5g_qos_profile_local_nonprim) { + ogs_error("OpenAPI_subscribed_default_qos_1_parseFromJSON failed [_5g_qos_profile]"); + goto end; + } } session_ambr = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_1_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_1_parseFromJSON failed [session_ambr]"); + goto end; + } } _3gpp_charging_characteristics = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "3gppChargingCharacteristics"); @@ -696,7 +712,6 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * OpenAPI_ip_address_1_t *static_ip_addressItem = OpenAPI_ip_address_1_parseFromJSON(static_ip_address_local); if (!static_ip_addressItem) { ogs_error("No static_ip_addressItem"); - OpenAPI_list_free(static_ip_addressList); goto end; } OpenAPI_list_add(static_ip_addressList, static_ip_addressItem); @@ -706,6 +721,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * up_security = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "upSecurity"); if (up_security) { up_security_local_nonprim = OpenAPI_up_security_1_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_1_parseFromJSON failed [up_security]"); + goto end; + } } pdu_session_continuity_ind = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "pduSessionContinuityInd"); @@ -728,6 +747,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * nidd_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "niddInfo"); if (nidd_info) { nidd_info_local_nonprim = OpenAPI_nidd_information_1_parseFromJSON(nidd_info); + if (!nidd_info_local_nonprim) { + ogs_error("OpenAPI_nidd_information_1_parseFromJSON failed [nidd_info]"); + goto end; + } } redundant_session_allowed = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "redundantSessionAllowed"); @@ -741,6 +764,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * acs_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "acsInfo"); if (acs_info) { acs_info_local_nonprim = OpenAPI_acs_info_1_parseFromJSON(acs_info); + if (!acs_info_local_nonprim) { + ogs_error("OpenAPI_acs_info_1_parseFromJSON failed [acs_info]"); + goto end; + } } ipv4_frame_route_list = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ipv4FrameRouteList"); @@ -761,7 +788,6 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * OpenAPI_frame_route_info_1_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_1_parseFromJSON(ipv4_frame_route_list_local); if (!ipv4_frame_route_listItem) { ogs_error("No ipv4_frame_route_listItem"); - OpenAPI_list_free(ipv4_frame_route_listList); goto end; } OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem); @@ -786,7 +812,6 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * OpenAPI_frame_route_info_1_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_1_parseFromJSON(ipv6_frame_route_list_local); if (!ipv6_frame_route_listItem) { ogs_error("No ipv6_frame_route_listItem"); - OpenAPI_list_free(ipv6_frame_route_listList); goto end; } OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem); @@ -828,6 +853,10 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * dn_aaa_address = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "dnAaaAddress"); if (dn_aaa_address) { dn_aaa_address_local_nonprim = OpenAPI_ip_address_1_parseFromJSON(dn_aaa_address); + if (!dn_aaa_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_1_parseFromJSON failed [dn_aaa_address]"); + goto end; + } } additional_dn_aaa_addresses = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "additionalDnAaaAddresses"); @@ -848,7 +877,6 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * OpenAPI_ip_address_1_t *additional_dn_aaa_addressesItem = OpenAPI_ip_address_1_parseFromJSON(additional_dn_aaa_addresses_local); if (!additional_dn_aaa_addressesItem) { ogs_error("No additional_dn_aaa_addressesItem"); - OpenAPI_list_free(additional_dn_aaa_addressesList); goto end; } OpenAPI_list_add(additional_dn_aaa_addressesList, additional_dn_aaa_addressesItem); @@ -874,16 +902,28 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * ipv4_index = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ipv4Index"); if (ipv4_index) { ipv4_index_local_nonprim = OpenAPI_ip_index_parseFromJSON(ipv4_index); + if (!ipv4_index_local_nonprim) { + ogs_error("OpenAPI_ip_index_parseFromJSON failed [ipv4_index]"); + goto end; + } } ipv6_index = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ipv6Index"); if (ipv6_index) { ipv6_index_local_nonprim = OpenAPI_ip_index_parseFromJSON(ipv6_index); + if (!ipv6_index_local_nonprim) { + ogs_error("OpenAPI_ip_index_parseFromJSON failed [ipv6_index]"); + goto end; + } } ecs_addr_config_info = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "ecsAddrConfigInfo"); if (ecs_addr_config_info) { ecs_addr_config_info_local_nonprim = OpenAPI_ecs_addr_config_info_1_parseFromJSON(ecs_addr_config_info); + if (!ecs_addr_config_info_local_nonprim) { + ogs_error("OpenAPI_ecs_addr_config_info_1_parseFromJSON failed [ecs_addr_config_info]"); + goto end; + } } additional_ecs_addr_config_infos = cJSON_GetObjectItemCaseSensitive(dnn_configuration_1JSON, "additionalEcsAddrConfigInfos"); @@ -904,7 +944,6 @@ OpenAPI_dnn_configuration_1_t *OpenAPI_dnn_configuration_1_parseFromJSON(cJSON * OpenAPI_ecs_addr_config_info_1_t *additional_ecs_addr_config_infosItem = OpenAPI_ecs_addr_config_info_1_parseFromJSON(additional_ecs_addr_config_infos_local); if (!additional_ecs_addr_config_infosItem) { ogs_error("No additional_ecs_addr_config_infosItem"); - OpenAPI_list_free(additional_ecs_addr_config_infosList); goto end; } OpenAPI_list_add(additional_ecs_addr_config_infosList, additional_ecs_addr_config_infosItem); diff --git a/lib/sbi/openapi/model/dnn_smf_info_item.c b/lib/sbi/openapi/model/dnn_smf_info_item.c index 41fb0f53c..87719e26c 100644 --- a/lib/sbi/openapi/model/dnn_smf_info_item.c +++ b/lib/sbi/openapi/model/dnn_smf_info_item.c @@ -114,7 +114,6 @@ OpenAPI_dnn_smf_info_item_t *OpenAPI_dnn_smf_info_item_parseFromJSON(cJSON *dnn_ OpenAPI_dnn_smf_info_item_dnai_list_inner_t *dnai_listItem = OpenAPI_dnn_smf_info_item_dnai_list_inner_parseFromJSON(dnai_list_local); if (!dnai_listItem) { ogs_error("No dnai_listItem"); - OpenAPI_list_free(dnai_listList); goto end; } OpenAPI_list_add(dnai_listList, dnai_listItem); diff --git a/lib/sbi/openapi/model/dnn_snssai_information.c b/lib/sbi/openapi/model/dnn_snssai_information.c index ee6260bc1..9cc7824cf 100644 --- a/lib/sbi/openapi/model/dnn_snssai_information.c +++ b/lib/sbi/openapi/model/dnn_snssai_information.c @@ -89,6 +89,10 @@ OpenAPI_dnn_snssai_information_t *OpenAPI_dnn_snssai_information_parseFromJSON(c snssai = cJSON_GetObjectItemCaseSensitive(dnn_snssai_informationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } dnn_snssai_information_local_var = OpenAPI_dnn_snssai_information_create ( diff --git a/lib/sbi/openapi/model/dnn_upf_info_item.c b/lib/sbi/openapi/model/dnn_upf_info_item.c index 5986c12e4..d2342ceee 100644 --- a/lib/sbi/openapi/model/dnn_upf_info_item.c +++ b/lib/sbi/openapi/model/dnn_upf_info_item.c @@ -314,7 +314,6 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_ OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local); if (!ipv4_address_rangesItem) { ogs_error("No ipv4_address_rangesItem"); - OpenAPI_list_free(ipv4_address_rangesList); goto end; } OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem); @@ -339,7 +338,6 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_ OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local); if (!ipv6_prefix_rangesItem) { ogs_error("No ipv6_prefix_rangesItem"); - OpenAPI_list_free(ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem); @@ -364,7 +362,6 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_ OpenAPI_ip_index_t *ipv4_index_listItem = OpenAPI_ip_index_parseFromJSON(ipv4_index_list_local); if (!ipv4_index_listItem) { ogs_error("No ipv4_index_listItem"); - OpenAPI_list_free(ipv4_index_listList); goto end; } OpenAPI_list_add(ipv4_index_listList, ipv4_index_listItem); @@ -389,7 +386,6 @@ OpenAPI_dnn_upf_info_item_t *OpenAPI_dnn_upf_info_item_parseFromJSON(cJSON *dnn_ OpenAPI_ip_index_t *ipv6_index_listItem = OpenAPI_ip_index_parseFromJSON(ipv6_index_list_local); if (!ipv6_index_listItem) { ogs_error("No ipv6_index_listItem"); - OpenAPI_list_free(ipv6_index_listList); goto end; } OpenAPI_list_add(ipv6_index_listList, ipv6_index_listItem); diff --git a/lib/sbi/openapi/model/eap_session.c b/lib/sbi/openapi/model/eap_session.c index 7d7bbebc1..b86b0194d 100644 --- a/lib/sbi/openapi/model/eap_session.c +++ b/lib/sbi/openapi/model/eap_session.c @@ -276,7 +276,6 @@ OpenAPI_eap_session_t *OpenAPI_eap_session_parseFromJSON(cJSON *eap_sessionJSON) OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local); if (!pvs_infoItem) { ogs_error("No pvs_infoItem"); - OpenAPI_list_free(pvs_infoList); goto end; } OpenAPI_list_add(pvs_infoList, pvs_infoItem); diff --git a/lib/sbi/openapi/model/eas_ip_replacement_info.c b/lib/sbi/openapi/model/eas_ip_replacement_info.c index 8833c7827..daad6ac81 100644 --- a/lib/sbi/openapi/model/eas_ip_replacement_info.c +++ b/lib/sbi/openapi/model/eas_ip_replacement_info.c @@ -95,6 +95,10 @@ OpenAPI_eas_ip_replacement_info_t *OpenAPI_eas_ip_replacement_info_parseFromJSON goto end; } source_local_nonprim = OpenAPI_eas_server_address_parseFromJSON(source); + if (!source_local_nonprim) { + ogs_error("OpenAPI_eas_server_address_parseFromJSON failed [source]"); + goto end; + } target = cJSON_GetObjectItemCaseSensitive(eas_ip_replacement_infoJSON, "target"); if (!target) { @@ -102,6 +106,10 @@ OpenAPI_eas_ip_replacement_info_t *OpenAPI_eas_ip_replacement_info_parseFromJSON goto end; } target_local_nonprim = OpenAPI_eas_server_address_parseFromJSON(target); + if (!target_local_nonprim) { + ogs_error("OpenAPI_eas_server_address_parseFromJSON failed [target]"); + goto end; + } eas_ip_replacement_info_local_var = OpenAPI_eas_ip_replacement_info_create ( source_local_nonprim, diff --git a/lib/sbi/openapi/model/eas_server_address.c b/lib/sbi/openapi/model/eas_server_address.c index dfccdd31d..c3003878e 100644 --- a/lib/sbi/openapi/model/eas_server_address.c +++ b/lib/sbi/openapi/model/eas_server_address.c @@ -80,6 +80,10 @@ OpenAPI_eas_server_address_t *OpenAPI_eas_server_address_parseFromJSON(cJSON *ea goto end; } ip_local_nonprim = OpenAPI_ip_addr_parseFromJSON(ip); + if (!ip_local_nonprim) { + ogs_error("OpenAPI_ip_addr_parseFromJSON failed [ip]"); + goto end; + } port = cJSON_GetObjectItemCaseSensitive(eas_server_addressJSON, "port"); if (!port) { diff --git a/lib/sbi/openapi/model/easdf_info.c b/lib/sbi/openapi/model/easdf_info.c index b3efdb73e..b4eb06273 100644 --- a/lib/sbi/openapi/model/easdf_info.c +++ b/lib/sbi/openapi/model/easdf_info.c @@ -142,7 +142,6 @@ OpenAPI_easdf_info_t *OpenAPI_easdf_info_parseFromJSON(cJSON *easdf_infoJSON) OpenAPI_snssai_easdf_info_item_t *s_nssai_easdf_info_listItem = OpenAPI_snssai_easdf_info_item_parseFromJSON(s_nssai_easdf_info_list_local); if (!s_nssai_easdf_info_listItem) { ogs_error("No s_nssai_easdf_info_listItem"); - OpenAPI_list_free(s_nssai_easdf_info_listList); goto end; } OpenAPI_list_add(s_nssai_easdf_info_listList, s_nssai_easdf_info_listItem); @@ -167,7 +166,6 @@ OpenAPI_easdf_info_t *OpenAPI_easdf_info_parseFromJSON(cJSON *easdf_infoJSON) OpenAPI_ip_addr_t *easdf_n6_ip_address_listItem = OpenAPI_ip_addr_parseFromJSON(easdf_n6_ip_address_list_local); if (!easdf_n6_ip_address_listItem) { ogs_error("No easdf_n6_ip_address_listItem"); - OpenAPI_list_free(easdf_n6_ip_address_listList); goto end; } OpenAPI_list_add(easdf_n6_ip_address_listList, easdf_n6_ip_address_listItem); @@ -192,7 +190,6 @@ OpenAPI_easdf_info_t *OpenAPI_easdf_info_parseFromJSON(cJSON *easdf_infoJSON) OpenAPI_ip_addr_t *upf_n6_ip_address_listItem = OpenAPI_ip_addr_parseFromJSON(upf_n6_ip_address_list_local); if (!upf_n6_ip_address_listItem) { ogs_error("No upf_n6_ip_address_listItem"); - OpenAPI_list_free(upf_n6_ip_address_listList); goto end; } OpenAPI_list_add(upf_n6_ip_address_listList, upf_n6_ip_address_listItem); diff --git a/lib/sbi/openapi/model/ebi_arp_mapping.c b/lib/sbi/openapi/model/ebi_arp_mapping.c index 8104641d3..340a57fce 100644 --- a/lib/sbi/openapi/model/ebi_arp_mapping.c +++ b/lib/sbi/openapi/model/ebi_arp_mapping.c @@ -90,6 +90,10 @@ OpenAPI_ebi_arp_mapping_t *OpenAPI_ebi_arp_mapping_parseFromJSON(cJSON *ebi_arp_ goto end; } arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } ebi_arp_mapping_local_var = OpenAPI_ebi_arp_mapping_create ( diff --git a/lib/sbi/openapi/model/ec_restriction.c b/lib/sbi/openapi/model/ec_restriction.c index 1f18cbae7..5cd64be3c 100644 --- a/lib/sbi/openapi/model/ec_restriction.c +++ b/lib/sbi/openapi/model/ec_restriction.c @@ -146,7 +146,6 @@ OpenAPI_ec_restriction_t *OpenAPI_ec_restriction_parseFromJSON(cJSON *ec_restric OpenAPI_plmn_ec_info_t *plmn_ec_infosItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_infos_local); if (!plmn_ec_infosItem) { ogs_error("No plmn_ec_infosItem"); - OpenAPI_list_free(plmn_ec_infosList); goto end; } OpenAPI_list_add(plmn_ec_infosList, plmn_ec_infosItem); diff --git a/lib/sbi/openapi/model/ec_restriction_1.c b/lib/sbi/openapi/model/ec_restriction_1.c index 9ac356d5d..8f4fa7515 100644 --- a/lib/sbi/openapi/model/ec_restriction_1.c +++ b/lib/sbi/openapi/model/ec_restriction_1.c @@ -146,7 +146,6 @@ OpenAPI_ec_restriction_1_t *OpenAPI_ec_restriction_1_parseFromJSON(cJSON *ec_res OpenAPI_plmn_ec_info_1_t *plmn_ec_infosItem = OpenAPI_plmn_ec_info_1_parseFromJSON(plmn_ec_infos_local); if (!plmn_ec_infosItem) { ogs_error("No plmn_ec_infosItem"); - OpenAPI_list_free(plmn_ec_infosList); goto end; } OpenAPI_list_add(plmn_ec_infosList, plmn_ec_infosItem); diff --git a/lib/sbi/openapi/model/ecgi.c b/lib/sbi/openapi/model/ecgi.c index c00651c1b..2906f62a0 100644 --- a/lib/sbi/openapi/model/ecgi.c +++ b/lib/sbi/openapi/model/ecgi.c @@ -102,6 +102,10 @@ OpenAPI_ecgi_t *OpenAPI_ecgi_parseFromJSON(cJSON *ecgiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } eutra_cell_id = cJSON_GetObjectItemCaseSensitive(ecgiJSON, "eutraCellId"); if (!eutra_cell_id) { diff --git a/lib/sbi/openapi/model/ecgi_1.c b/lib/sbi/openapi/model/ecgi_1.c index 041524b90..1f87e7820 100644 --- a/lib/sbi/openapi/model/ecgi_1.c +++ b/lib/sbi/openapi/model/ecgi_1.c @@ -102,6 +102,10 @@ OpenAPI_ecgi_1_t *OpenAPI_ecgi_1_parseFromJSON(cJSON *ecgi_1JSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } eutra_cell_id = cJSON_GetObjectItemCaseSensitive(ecgi_1JSON, "eutraCellId"); if (!eutra_cell_id) { diff --git a/lib/sbi/openapi/model/ecs_addr_config_info.c b/lib/sbi/openapi/model/ecs_addr_config_info.c index c2a104e92..ac0357c64 100644 --- a/lib/sbi/openapi/model/ecs_addr_config_info.c +++ b/lib/sbi/openapi/model/ecs_addr_config_info.c @@ -88,11 +88,19 @@ OpenAPI_ecs_addr_config_info_t *OpenAPI_ecs_addr_config_info_parseFromJSON(cJSON ecs_server_addr = cJSON_GetObjectItemCaseSensitive(ecs_addr_config_infoJSON, "ecsServerAddr"); if (ecs_server_addr) { ecs_server_addr_local_nonprim = OpenAPI_ecs_server_addr_parseFromJSON(ecs_server_addr); + if (!ecs_server_addr_local_nonprim) { + ogs_error("OpenAPI_ecs_server_addr_parseFromJSON failed [ecs_server_addr]"); + goto end; + } } spatial_validity_cond = cJSON_GetObjectItemCaseSensitive(ecs_addr_config_infoJSON, "spatialValidityCond"); if (spatial_validity_cond) { spatial_validity_cond_local_nonprim = OpenAPI_spatial_validity_cond_parseFromJSON(spatial_validity_cond); + if (!spatial_validity_cond_local_nonprim) { + ogs_error("OpenAPI_spatial_validity_cond_parseFromJSON failed [spatial_validity_cond]"); + goto end; + } } ecs_addr_config_info_local_var = OpenAPI_ecs_addr_config_info_create ( diff --git a/lib/sbi/openapi/model/ecs_addr_config_info_1.c b/lib/sbi/openapi/model/ecs_addr_config_info_1.c index 68018331d..ee6fc777f 100644 --- a/lib/sbi/openapi/model/ecs_addr_config_info_1.c +++ b/lib/sbi/openapi/model/ecs_addr_config_info_1.c @@ -88,11 +88,19 @@ OpenAPI_ecs_addr_config_info_1_t *OpenAPI_ecs_addr_config_info_1_parseFromJSON(c ecs_server_addr = cJSON_GetObjectItemCaseSensitive(ecs_addr_config_info_1JSON, "ecsServerAddr"); if (ecs_server_addr) { ecs_server_addr_local_nonprim = OpenAPI_ecs_server_addr_parseFromJSON(ecs_server_addr); + if (!ecs_server_addr_local_nonprim) { + ogs_error("OpenAPI_ecs_server_addr_parseFromJSON failed [ecs_server_addr]"); + goto end; + } } spatial_validity_cond = cJSON_GetObjectItemCaseSensitive(ecs_addr_config_info_1JSON, "spatialValidityCond"); if (spatial_validity_cond) { spatial_validity_cond_local_nonprim = OpenAPI_spatial_validity_cond_1_parseFromJSON(spatial_validity_cond); + if (!spatial_validity_cond_local_nonprim) { + ogs_error("OpenAPI_spatial_validity_cond_1_parseFromJSON failed [spatial_validity_cond]"); + goto end; + } } ecs_addr_config_info_1_local_var = OpenAPI_ecs_addr_config_info_1_create ( diff --git a/lib/sbi/openapi/model/ecs_server_addr.c b/lib/sbi/openapi/model/ecs_server_addr.c index 913c5cdbc..bd6a76a33 100644 --- a/lib/sbi/openapi/model/ecs_server_addr.c +++ b/lib/sbi/openapi/model/ecs_server_addr.c @@ -173,7 +173,6 @@ OpenAPI_ecs_server_addr_t *OpenAPI_ecs_server_addr_parseFromJSON(cJSON *ecs_serv OpenAPI_ip_addr_t *ecs_ip_address_listItem = OpenAPI_ip_addr_parseFromJSON(ecs_ip_address_list_local); if (!ecs_ip_address_listItem) { ogs_error("No ecs_ip_address_listItem"); - OpenAPI_list_free(ecs_ip_address_listList); goto end; } OpenAPI_list_add(ecs_ip_address_listList, ecs_ip_address_listItem); diff --git a/lib/sbi/openapi/model/ee_group_profile_data.c b/lib/sbi/openapi/model/ee_group_profile_data.c index f93dc5b70..81d641055 100644 --- a/lib/sbi/openapi/model/ee_group_profile_data.c +++ b/lib/sbi/openapi/model/ee_group_profile_data.c @@ -178,7 +178,6 @@ OpenAPI_ee_group_profile_data_t *OpenAPI_ee_group_profile_data_parseFromJSON(cJS OpenAPI_event_type_t *restricted_event_typesItem = OpenAPI_event_type_parseFromJSON(restricted_event_types_local); if (!restricted_event_typesItem) { ogs_error("No restricted_event_typesItem"); - OpenAPI_list_free(restricted_event_typesList); goto end; } OpenAPI_list_add(restricted_event_typesList, restricted_event_typesItem); diff --git a/lib/sbi/openapi/model/ee_profile_data.c b/lib/sbi/openapi/model/ee_profile_data.c index 6f2d8ea83..1f5eba628 100644 --- a/lib/sbi/openapi/model/ee_profile_data.c +++ b/lib/sbi/openapi/model/ee_profile_data.c @@ -178,7 +178,6 @@ OpenAPI_ee_profile_data_t *OpenAPI_ee_profile_data_parseFromJSON(cJSON *ee_profi OpenAPI_event_type_t *restricted_event_typesItem = OpenAPI_event_type_parseFromJSON(restricted_event_types_local); if (!restricted_event_typesItem) { ogs_error("No restricted_event_typesItem"); - OpenAPI_list_free(restricted_event_typesList); goto end; } OpenAPI_list_add(restricted_event_typesList, restricted_event_typesItem); diff --git a/lib/sbi/openapi/model/ee_subscription.c b/lib/sbi/openapi/model/ee_subscription.c index b687ac840..1632b4fcb 100644 --- a/lib/sbi/openapi/model/ee_subscription.c +++ b/lib/sbi/openapi/model/ee_subscription.c @@ -354,6 +354,10 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc reporting_options = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "reportingOptions"); if (reporting_options) { reporting_options_local_nonprim = OpenAPI_reporting_options_parseFromJSON(reporting_options); + if (!reporting_options_local_nonprim) { + ogs_error("OpenAPI_reporting_options_parseFromJSON failed [reporting_options]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "supportedFeatures"); @@ -375,6 +379,10 @@ OpenAPI_ee_subscription_t *OpenAPI_ee_subscription_parseFromJSON(cJSON *ee_subsc context_info = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } epc_applied_ind = cJSON_GetObjectItemCaseSensitive(ee_subscriptionJSON, "epcAppliedInd"); diff --git a/lib/sbi/openapi/model/ee_subscription_1.c b/lib/sbi/openapi/model/ee_subscription_1.c index a754927d7..6b5056154 100644 --- a/lib/sbi/openapi/model/ee_subscription_1.c +++ b/lib/sbi/openapi/model/ee_subscription_1.c @@ -354,6 +354,10 @@ OpenAPI_ee_subscription_1_t *OpenAPI_ee_subscription_1_parseFromJSON(cJSON *ee_s reporting_options = cJSON_GetObjectItemCaseSensitive(ee_subscription_1JSON, "reportingOptions"); if (reporting_options) { reporting_options_local_nonprim = OpenAPI_reporting_options_1_parseFromJSON(reporting_options); + if (!reporting_options_local_nonprim) { + ogs_error("OpenAPI_reporting_options_1_parseFromJSON failed [reporting_options]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ee_subscription_1JSON, "supportedFeatures"); @@ -375,6 +379,10 @@ OpenAPI_ee_subscription_1_t *OpenAPI_ee_subscription_1_parseFromJSON(cJSON *ee_s context_info = cJSON_GetObjectItemCaseSensitive(ee_subscription_1JSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } epc_applied_ind = cJSON_GetObjectItemCaseSensitive(ee_subscription_1JSON, "epcAppliedInd"); diff --git a/lib/sbi/openapi/model/ee_subscription_ext.c b/lib/sbi/openapi/model/ee_subscription_ext.c index 36dc176ea..83d65174f 100644 --- a/lib/sbi/openapi/model/ee_subscription_ext.c +++ b/lib/sbi/openapi/model/ee_subscription_ext.c @@ -423,6 +423,10 @@ OpenAPI_ee_subscription_ext_t *OpenAPI_ee_subscription_ext_parseFromJSON(cJSON * reporting_options = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "reportingOptions"); if (reporting_options) { reporting_options_local_nonprim = OpenAPI_reporting_options_1_parseFromJSON(reporting_options); + if (!reporting_options_local_nonprim) { + ogs_error("OpenAPI_reporting_options_1_parseFromJSON failed [reporting_options]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "supportedFeatures"); @@ -444,6 +448,10 @@ OpenAPI_ee_subscription_ext_t *OpenAPI_ee_subscription_ext_parseFromJSON(cJSON * context_info = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } epc_applied_ind = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "epcAppliedInd"); @@ -562,7 +570,6 @@ OpenAPI_ee_subscription_ext_t *OpenAPI_ee_subscription_ext_parseFromJSON(cJSON * OpenAPI_amf_subscription_info_t *amf_subscription_info_listItem = OpenAPI_amf_subscription_info_parseFromJSON(amf_subscription_info_list_local); if (!amf_subscription_info_listItem) { ogs_error("No amf_subscription_info_listItem"); - OpenAPI_list_free(amf_subscription_info_listList); goto end; } OpenAPI_list_add(amf_subscription_info_listList, amf_subscription_info_listItem); @@ -572,11 +579,19 @@ OpenAPI_ee_subscription_ext_t *OpenAPI_ee_subscription_ext_parseFromJSON(cJSON * smf_subscription_info = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "smfSubscriptionInfo"); if (smf_subscription_info) { smf_subscription_info_local_nonprim = OpenAPI_smf_subscription_info_parseFromJSON(smf_subscription_info); + if (!smf_subscription_info_local_nonprim) { + ogs_error("OpenAPI_smf_subscription_info_parseFromJSON failed [smf_subscription_info]"); + goto end; + } } hss_subscription_info = cJSON_GetObjectItemCaseSensitive(ee_subscription_extJSON, "hssSubscriptionInfo"); if (hss_subscription_info) { hss_subscription_info_local_nonprim = OpenAPI_hss_subscription_info_parseFromJSON(hss_subscription_info); + if (!hss_subscription_info_local_nonprim) { + ogs_error("OpenAPI_hss_subscription_info_parseFromJSON failed [hss_subscription_info]"); + goto end; + } } ee_subscription_ext_local_var = OpenAPI_ee_subscription_ext_create ( diff --git a/lib/sbi/openapi/model/ellipsoid_arc.c b/lib/sbi/openapi/model/ellipsoid_arc.c index db38bd6fb..1ca7648bc 100644 --- a/lib/sbi/openapi/model/ellipsoid_arc.c +++ b/lib/sbi/openapi/model/ellipsoid_arc.c @@ -135,6 +135,10 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(ellipsoid_arcJSON, "point"); if (!point) { @@ -142,6 +146,10 @@ OpenAPI_ellipsoid_arc_t *OpenAPI_ellipsoid_arc_parseFromJSON(cJSON *ellipsoid_ar goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } inner_radius = cJSON_GetObjectItemCaseSensitive(ellipsoid_arcJSON, "innerRadius"); if (!inner_radius) { diff --git a/lib/sbi/openapi/model/ellipsoid_arc_all_of.c b/lib/sbi/openapi/model/ellipsoid_arc_all_of.c index 9d97fd4da..3fa0adc5f 100644 --- a/lib/sbi/openapi/model/ellipsoid_arc_all_of.c +++ b/lib/sbi/openapi/model/ellipsoid_arc_all_of.c @@ -112,6 +112,10 @@ OpenAPI_ellipsoid_arc_all_of_t *OpenAPI_ellipsoid_arc_all_of_parseFromJSON(cJSON goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } inner_radius = cJSON_GetObjectItemCaseSensitive(ellipsoid_arc_all_ofJSON, "innerRadius"); if (!inner_radius) { diff --git a/lib/sbi/openapi/model/emergency_info.c b/lib/sbi/openapi/model/emergency_info.c index fe2ebba95..0620322e7 100644 --- a/lib/sbi/openapi/model/emergency_info.c +++ b/lib/sbi/openapi/model/emergency_info.c @@ -136,6 +136,10 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_parseFromJSON(cJSON *emergency_ pgw_ip_address = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "pgwIpAddress"); if (pgw_ip_address) { pgw_ip_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_address); + if (!pgw_ip_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [pgw_ip_address]"); + goto end; + } } smf_instance_id = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "smfInstanceId"); @@ -157,6 +161,10 @@ OpenAPI_emergency_info_t *OpenAPI_emergency_info_parseFromJSON(cJSON *emergency_ plmn_id = cJSON_GetObjectItemCaseSensitive(emergency_infoJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } emergency_info_local_var = OpenAPI_emergency_info_create ( diff --git a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c index bab2403f1..c80889803 100644 --- a/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c +++ b/lib/sbi/openapi/model/enhanced_coverage_restriction_data.c @@ -88,7 +88,6 @@ OpenAPI_enhanced_coverage_restriction_data_t *OpenAPI_enhanced_coverage_restrict OpenAPI_plmn_ec_info_t *plmn_ec_info_listItem = OpenAPI_plmn_ec_info_parseFromJSON(plmn_ec_info_list_local); if (!plmn_ec_info_listItem) { ogs_error("No plmn_ec_info_listItem"); - OpenAPI_list_free(plmn_ec_info_listList); goto end; } OpenAPI_list_add(plmn_ec_info_listList, plmn_ec_info_listItem); diff --git a/lib/sbi/openapi/model/eps_iwk_pgw.c b/lib/sbi/openapi/model/eps_iwk_pgw.c index cdce42d7c..e6375fb58 100644 --- a/lib/sbi/openapi/model/eps_iwk_pgw.c +++ b/lib/sbi/openapi/model/eps_iwk_pgw.c @@ -119,6 +119,10 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON) plmn_id = cJSON_GetObjectItemCaseSensitive(eps_iwk_pgwJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } eps_iwk_pgw_local_var = OpenAPI_eps_iwk_pgw_create ( diff --git a/lib/sbi/openapi/model/error_report.c b/lib/sbi/openapi/model/error_report.c index dec319ba2..f482c8175 100644 --- a/lib/sbi/openapi/model/error_report.c +++ b/lib/sbi/openapi/model/error_report.c @@ -170,6 +170,10 @@ OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJS error = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "error"); if (error) { error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } } rule_reports = cJSON_GetObjectItemCaseSensitive(error_reportJSON, "ruleReports"); @@ -190,7 +194,6 @@ OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJS OpenAPI_rule_report_t *rule_reportsItem = OpenAPI_rule_report_parseFromJSON(rule_reports_local); if (!rule_reportsItem) { ogs_error("No rule_reportsItem"); - OpenAPI_list_free(rule_reportsList); goto end; } OpenAPI_list_add(rule_reportsList, rule_reportsItem); @@ -215,7 +218,6 @@ OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJS OpenAPI_session_rule_report_t *sess_rule_reportsItem = OpenAPI_session_rule_report_parseFromJSON(sess_rule_reports_local); if (!sess_rule_reportsItem) { ogs_error("No sess_rule_reportsItem"); - OpenAPI_list_free(sess_rule_reportsList); goto end; } OpenAPI_list_add(sess_rule_reportsList, sess_rule_reportsItem); @@ -259,7 +261,6 @@ OpenAPI_error_report_t *OpenAPI_error_report_parseFromJSON(cJSON *error_reportJS OpenAPI_invalid_param_t *invalid_policy_decsItem = OpenAPI_invalid_param_parseFromJSON(invalid_policy_decs_local); if (!invalid_policy_decsItem) { ogs_error("No invalid_policy_decsItem"); - OpenAPI_list_free(invalid_policy_decsList); goto end; } OpenAPI_list_add(invalid_policy_decsList, invalid_policy_decsItem); diff --git a/lib/sbi/openapi/model/eutra_location.c b/lib/sbi/openapi/model/eutra_location.c index 907edef07..be4d735ed 100644 --- a/lib/sbi/openapi/model/eutra_location.c +++ b/lib/sbi/openapi/model/eutra_location.c @@ -215,6 +215,10 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca goto end; } tai_local_nonprim = OpenAPI_tai_parseFromJSON(tai); + if (!tai_local_nonprim) { + ogs_error("OpenAPI_tai_parseFromJSON failed [tai]"); + goto end; + } ignore_tai = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ignoreTai"); if (ignore_tai) { @@ -230,6 +234,10 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca goto end; } ecgi_local_nonprim = OpenAPI_ecgi_parseFromJSON(ecgi); + if (!ecgi_local_nonprim) { + ogs_error("OpenAPI_ecgi_parseFromJSON failed [ecgi]"); + goto end; + } ignore_ecgi = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "ignoreEcgi"); if (ignore_ecgi) { @@ -274,11 +282,19 @@ OpenAPI_eutra_location_t *OpenAPI_eutra_location_parseFromJSON(cJSON *eutra_loca global_ngenb_id = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "globalNgenbId"); if (global_ngenb_id) { global_ngenb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_ngenb_id); + if (!global_ngenb_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [global_ngenb_id]"); + goto end; + } } global_enb_id = cJSON_GetObjectItemCaseSensitive(eutra_locationJSON, "globalENbId"); if (global_enb_id) { global_enb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_enb_id); + if (!global_enb_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [global_enb_id]"); + goto end; + } } eutra_location_local_var = OpenAPI_eutra_location_create ( diff --git a/lib/sbi/openapi/model/event_notification.c b/lib/sbi/openapi/model/event_notification.c index 406970ce6..7cc4009c7 100644 --- a/lib/sbi/openapi/model/event_notification.c +++ b/lib/sbi/openapi/model/event_notification.c @@ -567,6 +567,10 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev goto end; } event_local_nonprim = OpenAPI_nwdaf_event_parseFromJSON(event); + if (!event_local_nonprim) { + ogs_error("OpenAPI_nwdaf_event_parseFromJSON failed [event]"); + goto end; + } start = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "start"); if (start) { @@ -595,6 +599,10 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev fail_notify_code = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "failNotifyCode"); if (fail_notify_code) { fail_notify_code_local_nonprim = OpenAPI_nwdaf_failure_code_parseFromJSON(fail_notify_code); + if (!fail_notify_code_local_nonprim) { + ogs_error("OpenAPI_nwdaf_failure_code_parseFromJSON failed [fail_notify_code]"); + goto end; + } } rv_wait_time = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "rvWaitTime"); @@ -608,6 +616,10 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev ana_meta_info = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "anaMetaInfo"); if (ana_meta_info) { ana_meta_info_local_nonprim = OpenAPI_analytics_metadata_info_parseFromJSON(ana_meta_info); + if (!ana_meta_info_local_nonprim) { + ogs_error("OpenAPI_analytics_metadata_info_parseFromJSON failed [ana_meta_info]"); + goto end; + } } nf_load_level_infos = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "nfLoadLevelInfos"); @@ -628,7 +640,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_nf_load_level_information_t *nf_load_level_infosItem = OpenAPI_nf_load_level_information_parseFromJSON(nf_load_level_infos_local); if (!nf_load_level_infosItem) { ogs_error("No nf_load_level_infosItem"); - OpenAPI_list_free(nf_load_level_infosList); goto end; } OpenAPI_list_add(nf_load_level_infosList, nf_load_level_infosItem); @@ -653,7 +664,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_nsi_load_level_info_t *nsi_load_level_infosItem = OpenAPI_nsi_load_level_info_parseFromJSON(nsi_load_level_infos_local); if (!nsi_load_level_infosItem) { ogs_error("No nsi_load_level_infosItem"); - OpenAPI_list_free(nsi_load_level_infosList); goto end; } OpenAPI_list_add(nsi_load_level_infosList, nsi_load_level_infosItem); @@ -663,6 +673,10 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev slice_load_level_info = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "sliceLoadLevelInfo"); if (slice_load_level_info) { slice_load_level_info_local_nonprim = OpenAPI_slice_load_level_information_parseFromJSON(slice_load_level_info); + if (!slice_load_level_info_local_nonprim) { + ogs_error("OpenAPI_slice_load_level_information_parseFromJSON failed [slice_load_level_info]"); + goto end; + } } svc_exps = cJSON_GetObjectItemCaseSensitive(event_notificationJSON, "svcExps"); @@ -683,7 +697,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_service_experience_info_t *svc_expsItem = OpenAPI_service_experience_info_parseFromJSON(svc_exps_local); if (!svc_expsItem) { ogs_error("No svc_expsItem"); - OpenAPI_list_free(svc_expsList); goto end; } OpenAPI_list_add(svc_expsList, svc_expsItem); @@ -708,7 +721,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_qos_sustainability_info_t *qos_sustain_infosItem = OpenAPI_qos_sustainability_info_parseFromJSON(qos_sustain_infos_local); if (!qos_sustain_infosItem) { ogs_error("No qos_sustain_infosItem"); - OpenAPI_list_free(qos_sustain_infosList); goto end; } OpenAPI_list_add(qos_sustain_infosList, qos_sustain_infosItem); @@ -733,7 +745,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_ue_communication_t *ue_commsItem = OpenAPI_ue_communication_parseFromJSON(ue_comms_local); if (!ue_commsItem) { ogs_error("No ue_commsItem"); - OpenAPI_list_free(ue_commsList); goto end; } OpenAPI_list_add(ue_commsList, ue_commsItem); @@ -758,7 +769,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_ue_mobility_t *ue_mobsItem = OpenAPI_ue_mobility_parseFromJSON(ue_mobs_local); if (!ue_mobsItem) { ogs_error("No ue_mobsItem"); - OpenAPI_list_free(ue_mobsList); goto end; } OpenAPI_list_add(ue_mobsList, ue_mobsItem); @@ -783,7 +793,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_user_data_congestion_info_t *user_data_cong_infosItem = OpenAPI_user_data_congestion_info_parseFromJSON(user_data_cong_infos_local); if (!user_data_cong_infosItem) { ogs_error("No user_data_cong_infosItem"); - OpenAPI_list_free(user_data_cong_infosList); goto end; } OpenAPI_list_add(user_data_cong_infosList, user_data_cong_infosItem); @@ -808,7 +817,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_abnormal_behaviour_t *abnor_behavrsItem = OpenAPI_abnormal_behaviour_parseFromJSON(abnor_behavrs_local); if (!abnor_behavrsItem) { ogs_error("No abnor_behavrsItem"); - OpenAPI_list_free(abnor_behavrsList); goto end; } OpenAPI_list_add(abnor_behavrsList, abnor_behavrsItem); @@ -833,7 +841,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_network_perf_info_t *nw_perfsItem = OpenAPI_network_perf_info_parseFromJSON(nw_perfs_local); if (!nw_perfsItem) { ogs_error("No nw_perfsItem"); - OpenAPI_list_free(nw_perfsList); goto end; } OpenAPI_list_add(nw_perfsList, nw_perfsItem); @@ -858,7 +865,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_dn_perf_info_t *dn_perf_infosItem = OpenAPI_dn_perf_info_parseFromJSON(dn_perf_infos_local); if (!dn_perf_infosItem) { ogs_error("No dn_perf_infosItem"); - OpenAPI_list_free(dn_perf_infosList); goto end; } OpenAPI_list_add(dn_perf_infosList, dn_perf_infosItem); @@ -883,7 +889,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_dispersion_info_t *disper_infosItem = OpenAPI_dispersion_info_parseFromJSON(disper_infos_local); if (!disper_infosItem) { ogs_error("No disper_infosItem"); - OpenAPI_list_free(disper_infosList); goto end; } OpenAPI_list_add(disper_infosList, disper_infosItem); @@ -908,7 +913,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_redundant_transmission_exp_info_t *red_trans_infosItem = OpenAPI_redundant_transmission_exp_info_parseFromJSON(red_trans_infos_local); if (!red_trans_infosItem) { ogs_error("No red_trans_infosItem"); - OpenAPI_list_free(red_trans_infosList); goto end; } OpenAPI_list_add(red_trans_infosList, red_trans_infosItem); @@ -933,7 +937,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_wlan_performance_info_t *wlan_infosItem = OpenAPI_wlan_performance_info_parseFromJSON(wlan_infos_local); if (!wlan_infosItem) { ogs_error("No wlan_infosItem"); - OpenAPI_list_free(wlan_infosList); goto end; } OpenAPI_list_add(wlan_infosList, wlan_infosItem); @@ -958,7 +961,6 @@ OpenAPI_event_notification_t *OpenAPI_event_notification_parseFromJSON(cJSON *ev OpenAPI_smcce_info_t *smcc_expsItem = OpenAPI_smcce_info_parseFromJSON(smcc_exps_local); if (!smcc_expsItem) { ogs_error("No smcc_expsItem"); - OpenAPI_list_free(smcc_expsList); goto end; } OpenAPI_list_add(smcc_expsList, smcc_expsItem); diff --git a/lib/sbi/openapi/model/event_reporting_requirement.c b/lib/sbi/openapi/model/event_reporting_requirement.c index 94f0a3f7d..a6e826eb0 100644 --- a/lib/sbi/openapi/model/event_reporting_requirement.c +++ b/lib/sbi/openapi/model/event_reporting_requirement.c @@ -232,6 +232,10 @@ OpenAPI_event_reporting_requirement_t *OpenAPI_event_reporting_requirement_parse accuracy = cJSON_GetObjectItemCaseSensitive(event_reporting_requirementJSON, "accuracy"); if (accuracy) { accuracy_local_nonprim = OpenAPI_accuracy_parseFromJSON(accuracy); + if (!accuracy_local_nonprim) { + ogs_error("OpenAPI_accuracy_parseFromJSON failed [accuracy]"); + goto end; + } } acc_per_subset = cJSON_GetObjectItemCaseSensitive(event_reporting_requirementJSON, "accPerSubset"); @@ -252,7 +256,6 @@ OpenAPI_event_reporting_requirement_t *OpenAPI_event_reporting_requirement_parse OpenAPI_accuracy_t *acc_per_subsetItem = OpenAPI_accuracy_parseFromJSON(acc_per_subset_local); if (!acc_per_subsetItem) { ogs_error("No acc_per_subsetItem"); - OpenAPI_list_free(acc_per_subsetList); goto end; } OpenAPI_list_add(acc_per_subsetList, acc_per_subsetItem); @@ -333,7 +336,6 @@ OpenAPI_event_reporting_requirement_t *OpenAPI_event_reporting_requirement_parse OpenAPI_analytics_metadata_t *ana_metaItem = OpenAPI_analytics_metadata_parseFromJSON(ana_meta_local); if (!ana_metaItem) { ogs_error("No ana_metaItem"); - OpenAPI_list_free(ana_metaList); goto end; } OpenAPI_list_add(ana_metaList, ana_metaItem); @@ -343,6 +345,10 @@ OpenAPI_event_reporting_requirement_t *OpenAPI_event_reporting_requirement_parse ana_meta_ind = cJSON_GetObjectItemCaseSensitive(event_reporting_requirementJSON, "anaMetaInd"); if (ana_meta_ind) { ana_meta_ind_local_nonprim = OpenAPI_analytics_metadata_indication_parseFromJSON(ana_meta_ind); + if (!ana_meta_ind_local_nonprim) { + ogs_error("OpenAPI_analytics_metadata_indication_parseFromJSON failed [ana_meta_ind]"); + goto end; + } } event_reporting_requirement_local_var = OpenAPI_event_reporting_requirement_create ( diff --git a/lib/sbi/openapi/model/event_subscription.c b/lib/sbi/openapi/model/event_subscription.c index 11c2f8541..496a04dde 100644 --- a/lib/sbi/openapi/model/event_subscription.c +++ b/lib/sbi/openapi/model/event_subscription.c @@ -1046,10 +1046,18 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev goto end; } event_local_nonprim = OpenAPI_nwdaf_event_parseFromJSON(event); + if (!event_local_nonprim) { + ogs_error("OpenAPI_nwdaf_event_parseFromJSON failed [event]"); + goto end; + } extra_report_req = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "extraReportReq"); if (extra_report_req) { extra_report_req_local_nonprim = OpenAPI_event_reporting_requirement_parseFromJSON(extra_report_req); + if (!extra_report_req_local_nonprim) { + ogs_error("OpenAPI_event_reporting_requirement_parseFromJSON failed [extra_report_req]"); + goto end; + } } ladn_dnns = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "ladnDnns"); @@ -1084,11 +1092,19 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev notification_method = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "notificationMethod"); if (notification_method) { notification_method_local_nonprim = OpenAPI_notification_method_parseFromJSON(notification_method); + if (!notification_method_local_nonprim) { + ogs_error("OpenAPI_notification_method_parseFromJSON failed [notification_method]"); + goto end; + } } matching_dir = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "matchingDir"); if (matching_dir) { matching_dir_local_nonprim = OpenAPI_matching_direction_parseFromJSON(matching_dir); + if (!matching_dir_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [matching_dir]"); + goto end; + } } nf_load_lvl_thds = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "nfLoadLvlThds"); @@ -1109,7 +1125,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_threshold_level_t *nf_load_lvl_thdsItem = OpenAPI_threshold_level_parseFromJSON(nf_load_lvl_thds_local); if (!nf_load_lvl_thdsItem) { ogs_error("No nf_load_lvl_thdsItem"); - OpenAPI_list_free(nf_load_lvl_thdsList); goto end; } OpenAPI_list_add(nf_load_lvl_thdsList, nf_load_lvl_thdsItem); @@ -1180,6 +1195,10 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev network_area = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "networkArea"); if (network_area) { network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } } visited_areas = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "visitedAreas"); @@ -1200,7 +1219,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_network_area_info_t *visited_areasItem = OpenAPI_network_area_info_parseFromJSON(visited_areas_local); if (!visited_areasItem) { ogs_error("No visited_areasItem"); - OpenAPI_list_free(visited_areasList); goto end; } OpenAPI_list_add(visited_areasList, visited_areasItem); @@ -1241,7 +1259,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_nsi_id_info_t *nsi_id_infosItem = OpenAPI_nsi_id_info_parseFromJSON(nsi_id_infos_local); if (!nsi_id_infosItem) { ogs_error("No nsi_id_infosItem"); - OpenAPI_list_free(nsi_id_infosList); goto end; } OpenAPI_list_add(nsi_id_infosList, nsi_id_infosItem); @@ -1278,6 +1295,10 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev qos_requ = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "qosRequ"); if (qos_requ) { qos_requ_local_nonprim = OpenAPI_qos_requirement_parseFromJSON(qos_requ); + if (!qos_requ_local_nonprim) { + ogs_error("OpenAPI_qos_requirement_parseFromJSON failed [qos_requ]"); + goto end; + } } qos_flow_ret_thds = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "qosFlowRetThds"); @@ -1298,7 +1319,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_retainability_threshold_t *qos_flow_ret_thdsItem = OpenAPI_retainability_threshold_parseFromJSON(qos_flow_ret_thds_local); if (!qos_flow_ret_thdsItem) { ogs_error("No qos_flow_ret_thdsItem"); - OpenAPI_list_free(qos_flow_ret_thdsList); goto end; } OpenAPI_list_add(qos_flow_ret_thdsList, qos_flow_ret_thdsItem); @@ -1352,7 +1372,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_snssai_t *snssaiaItem = OpenAPI_snssai_parseFromJSON(snssaia_local); if (!snssaiaItem) { ogs_error("No snssaiaItem"); - OpenAPI_list_free(snssaiaList); goto end; } OpenAPI_list_add(snssaiaList, snssaiaItem); @@ -1362,6 +1381,10 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev tgt_ue = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "tgtUe"); if (tgt_ue) { tgt_ue_local_nonprim = OpenAPI_target_ue_information_parseFromJSON(tgt_ue); + if (!tgt_ue_local_nonprim) { + ogs_error("OpenAPI_target_ue_information_parseFromJSON failed [tgt_ue]"); + goto end; + } } cong_thresholds = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "congThresholds"); @@ -1382,7 +1405,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_threshold_level_t *cong_thresholdsItem = OpenAPI_threshold_level_parseFromJSON(cong_thresholds_local); if (!cong_thresholdsItem) { ogs_error("No cong_thresholdsItem"); - OpenAPI_list_free(cong_thresholdsList); goto end; } OpenAPI_list_add(cong_thresholdsList, cong_thresholdsItem); @@ -1407,7 +1429,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_network_perf_requirement_t *nw_perf_requsItem = OpenAPI_network_perf_requirement_parseFromJSON(nw_perf_requs_local); if (!nw_perf_requsItem) { ogs_error("No nw_perf_requsItem"); - OpenAPI_list_free(nw_perf_requsList); goto end; } OpenAPI_list_add(nw_perf_requsList, nw_perf_requsItem); @@ -1432,7 +1453,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_bw_requirement_t *bw_requsItem = OpenAPI_bw_requirement_parseFromJSON(bw_requs_local); if (!bw_requsItem) { ogs_error("No bw_requsItem"); - OpenAPI_list_free(bw_requsList); goto end; } OpenAPI_list_add(bw_requsList, bw_requsItem); @@ -1457,7 +1477,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_exception_t *excep_requsItem = OpenAPI_exception_parseFromJSON(excep_requs_local); if (!excep_requsItem) { ogs_error("No excep_requsItem"); - OpenAPI_list_free(excep_requsList); goto end; } OpenAPI_list_add(excep_requsList, excep_requsItem); @@ -1467,11 +1486,19 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev expt_ana_type = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "exptAnaType"); if (expt_ana_type) { expt_ana_type_local_nonprim = OpenAPI_expected_analytics_type_parseFromJSON(expt_ana_type); + if (!expt_ana_type_local_nonprim) { + ogs_error("OpenAPI_expected_analytics_type_parseFromJSON failed [expt_ana_type]"); + goto end; + } } expt_ue_behav = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "exptUeBehav"); if (expt_ue_behav) { expt_ue_behav_local_nonprim = OpenAPI_expected_ue_behaviour_data_parseFromJSON(expt_ue_behav); + if (!expt_ue_behav_local_nonprim) { + ogs_error("OpenAPI_expected_ue_behaviour_data_parseFromJSON failed [expt_ue_behav]"); + goto end; + } } rat_freqs = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "ratFreqs"); @@ -1492,7 +1519,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_rat_freq_information_t *rat_freqsItem = OpenAPI_rat_freq_information_parseFromJSON(rat_freqs_local); if (!rat_freqsItem) { ogs_error("No rat_freqsItem"); - OpenAPI_list_free(rat_freqsList); goto end; } OpenAPI_list_add(rat_freqsList, rat_freqsItem); @@ -1517,7 +1543,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_analytics_subset_t *list_of_ana_subsetsItem = OpenAPI_analytics_subset_parseFromJSON(list_of_ana_subsets_local); if (!list_of_ana_subsetsItem) { ogs_error("No list_of_ana_subsetsItem"); - OpenAPI_list_free(list_of_ana_subsetsList); goto end; } OpenAPI_list_add(list_of_ana_subsetsList, list_of_ana_subsetsItem); @@ -1542,7 +1567,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_dispersion_requirement_t *disper_reqsItem = OpenAPI_dispersion_requirement_parseFromJSON(disper_reqs_local); if (!disper_reqsItem) { ogs_error("No disper_reqsItem"); - OpenAPI_list_free(disper_reqsList); goto end; } OpenAPI_list_add(disper_reqsList, disper_reqsItem); @@ -1567,7 +1591,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_redundant_transmission_exp_req_t *red_trans_reqsItem = OpenAPI_redundant_transmission_exp_req_parseFromJSON(red_trans_reqs_local); if (!red_trans_reqsItem) { ogs_error("No red_trans_reqsItem"); - OpenAPI_list_free(red_trans_reqsList); goto end; } OpenAPI_list_add(red_trans_reqsList, red_trans_reqsItem); @@ -1592,7 +1615,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_wlan_performance_req_t *wlan_reqsItem = OpenAPI_wlan_performance_req_parseFromJSON(wlan_reqs_local); if (!wlan_reqsItem) { ogs_error("No wlan_reqsItem"); - OpenAPI_list_free(wlan_reqsList); goto end; } OpenAPI_list_add(wlan_reqsList, wlan_reqsItem); @@ -1602,6 +1624,10 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev upf_info = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "upfInfo"); if (upf_info) { upf_info_local_nonprim = OpenAPI_upf_information_parseFromJSON(upf_info); + if (!upf_info_local_nonprim) { + ogs_error("OpenAPI_upf_information_parseFromJSON failed [upf_info]"); + goto end; + } } app_server_addrs = cJSON_GetObjectItemCaseSensitive(event_subscriptionJSON, "appServerAddrs"); @@ -1622,7 +1648,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_addr_fqdn_t *app_server_addrsItem = OpenAPI_addr_fqdn_parseFromJSON(app_server_addrs_local); if (!app_server_addrsItem) { ogs_error("No app_server_addrsItem"); - OpenAPI_list_free(app_server_addrsList); goto end; } OpenAPI_list_add(app_server_addrsList, app_server_addrsItem); @@ -1647,7 +1672,6 @@ OpenAPI_event_subscription_t *OpenAPI_event_subscription_parseFromJSON(cJSON *ev OpenAPI_dn_performance_req_t *dn_perf_reqsItem = OpenAPI_dn_performance_req_parseFromJSON(dn_perf_reqs_local); if (!dn_perf_reqsItem) { ogs_error("No dn_perf_reqsItem"); - OpenAPI_list_free(dn_perf_reqsList); goto end; } OpenAPI_list_add(dn_perf_reqsList, dn_perf_reqsItem); diff --git a/lib/sbi/openapi/model/events_notification.c b/lib/sbi/openapi/model/events_notification.c index ce1f26634..8e4bf283a 100644 --- a/lib/sbi/openapi/model/events_notification.c +++ b/lib/sbi/openapi/model/events_notification.c @@ -610,7 +610,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_app_detection_report_t *ad_reportsItem = OpenAPI_app_detection_report_parseFromJSON(ad_reports_local); if (!ad_reportsItem) { ogs_error("No ad_reportsItem"); - OpenAPI_list_free(ad_reportsList); goto end; } OpenAPI_list_add(ad_reportsList, ad_reportsItem); @@ -629,16 +628,28 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * add_access_info = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "addAccessInfo"); if (add_access_info) { add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info); + if (!add_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [add_access_info]"); + goto end; + } } rel_access_info = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "relAccessInfo"); if (rel_access_info) { rel_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(rel_access_info); + if (!rel_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [rel_access_info]"); + goto end; + } } an_charg_addr = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anChargAddr"); if (an_charg_addr) { an_charg_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(an_charg_addr); + if (!an_charg_addr_local_nonprim) { + ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON failed [an_charg_addr]"); + goto end; + } } an_charg_ids = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anChargIds"); @@ -659,7 +670,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_access_net_charging_identifier_t *an_charg_idsItem = OpenAPI_access_net_charging_identifier_parseFromJSON(an_charg_ids_local); if (!an_charg_idsItem) { ogs_error("No an_charg_idsItem"); - OpenAPI_list_free(an_charg_idsList); goto end; } OpenAPI_list_add(an_charg_idsList, an_charg_idsItem); @@ -669,6 +679,10 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * an_gw_addr = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "anGwAddr"); if (an_gw_addr) { an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr); + if (!an_gw_addr_local_nonprim) { + ogs_error("OpenAPI_an_gw_address_parseFromJSON failed [an_gw_addr]"); + goto end; + } } ev_subs_uri = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "evSubsUri"); @@ -702,7 +716,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_af_event_notification_t *ev_notifsItem = OpenAPI_af_event_notification_parseFromJSON(ev_notifs_local); if (!ev_notifsItem) { ogs_error("No ev_notifsItem"); - OpenAPI_list_free(ev_notifsList); goto end; } OpenAPI_list_add(ev_notifsList, ev_notifsItem); @@ -726,7 +739,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_resources_allocation_info_t *failed_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(failed_resourc_alloc_reports_local); if (!failed_resourc_alloc_reportsItem) { ogs_error("No failed_resourc_alloc_reportsItem"); - OpenAPI_list_free(failed_resourc_alloc_reportsList); goto end; } OpenAPI_list_add(failed_resourc_alloc_reportsList, failed_resourc_alloc_reportsItem); @@ -751,7 +763,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_resources_allocation_info_t *succ_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(succ_resourc_alloc_reports_local); if (!succ_resourc_alloc_reportsItem) { ogs_error("No succ_resourc_alloc_reportsItem"); - OpenAPI_list_free(succ_resourc_alloc_reportsList); goto end; } OpenAPI_list_add(succ_resourc_alloc_reportsList, succ_resourc_alloc_reportsItem); @@ -785,7 +796,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_out_of_credit_information_t *out_of_cred_reportsItem = OpenAPI_out_of_credit_information_parseFromJSON(out_of_cred_reports_local); if (!out_of_cred_reportsItem) { ogs_error("No out_of_cred_reportsItem"); - OpenAPI_list_free(out_of_cred_reportsList); goto end; } OpenAPI_list_add(out_of_cred_reportsList, out_of_cred_reportsItem); @@ -795,6 +805,10 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * plmn_id = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [plmn_id]"); + goto end; + } } qnc_reports = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "qncReports"); @@ -815,7 +829,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local); if (!qnc_reportsItem) { ogs_error("No qnc_reportsItem"); - OpenAPI_list_free(qnc_reportsList); goto end; } OpenAPI_list_add(qnc_reportsList, qnc_reportsItem); @@ -840,7 +853,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local); if (!qos_mon_reportsItem) { ogs_error("No qos_mon_reportsItem"); - OpenAPI_list_free(qos_mon_reportsList); goto end; } OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem); @@ -865,7 +877,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local); if (!ran_nas_rel_causesItem) { ogs_error("No ran_nas_rel_causesItem"); - OpenAPI_list_free(ran_nas_rel_causesList); goto end; } OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem); @@ -893,6 +904,10 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * ue_loc = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ueLoc"); if (ue_loc) { ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc); + if (!ue_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_loc]"); + goto end; + } } ue_loc_time = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "ueLocTime"); @@ -914,16 +929,28 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * usg_rep = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "usgRep"); if (usg_rep) { usg_rep_local_nonprim = OpenAPI_accumulated_usage_parseFromJSON(usg_rep); + if (!usg_rep_local_nonprim) { + ogs_error("OpenAPI_accumulated_usage_parseFromJSON failed [usg_rep]"); + goto end; + } } tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(events_notificationJSON, "tsnPortManContNwtts"); @@ -944,7 +971,6 @@ OpenAPI_events_notification_t *OpenAPI_events_notification_parseFromJSON(cJSON * OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); diff --git a/lib/sbi/openapi/model/events_subsc_put_data.c b/lib/sbi/openapi/model/events_subsc_put_data.c index 3ab2f9165..3eb5c401e 100644 --- a/lib/sbi/openapi/model/events_subsc_put_data.c +++ b/lib/sbi/openapi/model/events_subsc_put_data.c @@ -793,7 +793,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_af_event_subscription_t *eventsItem = OpenAPI_af_event_subscription_parseFromJSON(events_local); if (!eventsItem) { ogs_error("No eventsItem"); - OpenAPI_list_free(eventsList); goto end; } OpenAPI_list_add(eventsList, eventsItem); @@ -829,6 +828,10 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "qosMon"); if (qos_mon) { qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_parseFromJSON(qos_mon); + if (!qos_mon_local_nonprim) { + ogs_error("OpenAPI_qos_monitoring_information_parseFromJSON failed [qos_mon]"); + goto end; + } } req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "reqAnis"); @@ -853,6 +856,10 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "usgThres"); if (usg_thres) { usg_thres_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usg_thres); + if (!usg_thres_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_parseFromJSON failed [usg_thres]"); + goto end; + } } notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "notifCorreId"); @@ -910,7 +917,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_app_detection_report_t *ad_reportsItem = OpenAPI_app_detection_report_parseFromJSON(ad_reports_local); if (!ad_reportsItem) { ogs_error("No ad_reportsItem"); - OpenAPI_list_free(ad_reportsList); goto end; } OpenAPI_list_add(ad_reportsList, ad_reportsItem); @@ -929,16 +935,28 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS add_access_info = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "addAccessInfo"); if (add_access_info) { add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info); + if (!add_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [add_access_info]"); + goto end; + } } rel_access_info = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "relAccessInfo"); if (rel_access_info) { rel_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(rel_access_info); + if (!rel_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [rel_access_info]"); + goto end; + } } an_charg_addr = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anChargAddr"); if (an_charg_addr) { an_charg_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(an_charg_addr); + if (!an_charg_addr_local_nonprim) { + ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON failed [an_charg_addr]"); + goto end; + } } an_charg_ids = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anChargIds"); @@ -959,7 +977,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_access_net_charging_identifier_t *an_charg_idsItem = OpenAPI_access_net_charging_identifier_parseFromJSON(an_charg_ids_local); if (!an_charg_idsItem) { ogs_error("No an_charg_idsItem"); - OpenAPI_list_free(an_charg_idsList); goto end; } OpenAPI_list_add(an_charg_idsList, an_charg_idsItem); @@ -969,6 +986,10 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS an_gw_addr = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "anGwAddr"); if (an_gw_addr) { an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr); + if (!an_gw_addr_local_nonprim) { + ogs_error("OpenAPI_an_gw_address_parseFromJSON failed [an_gw_addr]"); + goto end; + } } ev_subs_uri = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "evSubsUri"); @@ -1002,7 +1023,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_af_event_notification_t *ev_notifsItem = OpenAPI_af_event_notification_parseFromJSON(ev_notifs_local); if (!ev_notifsItem) { ogs_error("No ev_notifsItem"); - OpenAPI_list_free(ev_notifsList); goto end; } OpenAPI_list_add(ev_notifsList, ev_notifsItem); @@ -1026,7 +1046,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_resources_allocation_info_t *failed_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(failed_resourc_alloc_reports_local); if (!failed_resourc_alloc_reportsItem) { ogs_error("No failed_resourc_alloc_reportsItem"); - OpenAPI_list_free(failed_resourc_alloc_reportsList); goto end; } OpenAPI_list_add(failed_resourc_alloc_reportsList, failed_resourc_alloc_reportsItem); @@ -1051,7 +1070,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_resources_allocation_info_t *succ_resourc_alloc_reportsItem = OpenAPI_resources_allocation_info_parseFromJSON(succ_resourc_alloc_reports_local); if (!succ_resourc_alloc_reportsItem) { ogs_error("No succ_resourc_alloc_reportsItem"); - OpenAPI_list_free(succ_resourc_alloc_reportsList); goto end; } OpenAPI_list_add(succ_resourc_alloc_reportsList, succ_resourc_alloc_reportsItem); @@ -1085,7 +1103,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_out_of_credit_information_t *out_of_cred_reportsItem = OpenAPI_out_of_credit_information_parseFromJSON(out_of_cred_reports_local); if (!out_of_cred_reportsItem) { ogs_error("No out_of_cred_reportsItem"); - OpenAPI_list_free(out_of_cred_reportsList); goto end; } OpenAPI_list_add(out_of_cred_reportsList, out_of_cred_reportsItem); @@ -1095,6 +1112,10 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS plmn_id = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [plmn_id]"); + goto end; + } } qnc_reports = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "qncReports"); @@ -1115,7 +1136,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local); if (!qnc_reportsItem) { ogs_error("No qnc_reportsItem"); - OpenAPI_list_free(qnc_reportsList); goto end; } OpenAPI_list_add(qnc_reportsList, qnc_reportsItem); @@ -1140,7 +1160,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local); if (!qos_mon_reportsItem) { ogs_error("No qos_mon_reportsItem"); - OpenAPI_list_free(qos_mon_reportsList); goto end; } OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem); @@ -1165,7 +1184,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local); if (!ran_nas_rel_causesItem) { ogs_error("No ran_nas_rel_causesItem"); - OpenAPI_list_free(ran_nas_rel_causesList); goto end; } OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem); @@ -1193,6 +1211,10 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS ue_loc = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ueLoc"); if (ue_loc) { ue_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_loc); + if (!ue_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_loc]"); + goto end; + } } ue_loc_time = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "ueLocTime"); @@ -1214,16 +1236,28 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS usg_rep = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "usgRep"); if (usg_rep) { usg_rep_local_nonprim = OpenAPI_accumulated_usage_parseFromJSON(usg_rep); + if (!usg_rep_local_nonprim) { + ogs_error("OpenAPI_accumulated_usage_parseFromJSON failed [usg_rep]"); + goto end; + } } tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(events_subsc_put_dataJSON, "tsnPortManContNwtts"); @@ -1244,7 +1278,6 @@ OpenAPI_events_subsc_put_data_t *OpenAPI_events_subsc_put_data_parseFromJSON(cJS OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); diff --git a/lib/sbi/openapi/model/events_subsc_req_data.c b/lib/sbi/openapi/model/events_subsc_req_data.c index fcc6893c3..a68a76733 100644 --- a/lib/sbi/openapi/model/events_subsc_req_data.c +++ b/lib/sbi/openapi/model/events_subsc_req_data.c @@ -244,7 +244,6 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS OpenAPI_af_event_subscription_t *eventsItem = OpenAPI_af_event_subscription_parseFromJSON(events_local); if (!eventsItem) { ogs_error("No eventsItem"); - OpenAPI_list_free(eventsList); goto end; } OpenAPI_list_add(eventsList, eventsItem); @@ -280,6 +279,10 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "qosMon"); if (qos_mon) { qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_parseFromJSON(qos_mon); + if (!qos_mon_local_nonprim) { + ogs_error("OpenAPI_qos_monitoring_information_parseFromJSON failed [qos_mon]"); + goto end; + } } req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "reqAnis"); @@ -304,6 +307,10 @@ OpenAPI_events_subsc_req_data_t *OpenAPI_events_subsc_req_data_parseFromJSON(cJS usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "usgThres"); if (usg_thres) { usg_thres_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usg_thres); + if (!usg_thres_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_parseFromJSON failed [usg_thres]"); + goto end; + } } notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_req_dataJSON, "notifCorreId"); diff --git a/lib/sbi/openapi/model/events_subsc_req_data_rm.c b/lib/sbi/openapi/model/events_subsc_req_data_rm.c index 39b1b85cd..5b749d1d1 100644 --- a/lib/sbi/openapi/model/events_subsc_req_data_rm.c +++ b/lib/sbi/openapi/model/events_subsc_req_data_rm.c @@ -219,7 +219,6 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS OpenAPI_af_event_subscription_t *eventsItem = OpenAPI_af_event_subscription_parseFromJSON(events_local); if (!eventsItem) { ogs_error("No eventsItem"); - OpenAPI_list_free(eventsList); goto end; } OpenAPI_list_add(eventsList, eventsItem); @@ -255,6 +254,10 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS qos_mon = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "qosMon"); if (qos_mon) { qos_mon_local_nonprim = OpenAPI_qos_monitoring_information_rm_parseFromJSON(qos_mon); + if (!qos_mon_local_nonprim) { + ogs_error("OpenAPI_qos_monitoring_information_rm_parseFromJSON failed [qos_mon]"); + goto end; + } } req_anis = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "reqAnis"); @@ -279,6 +282,10 @@ OpenAPI_events_subsc_req_data_rm_t *OpenAPI_events_subsc_req_data_rm_parseFromJS usg_thres = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "usgThres"); if (usg_thres) { usg_thres_local_nonprim = OpenAPI_usage_threshold_rm_parseFromJSON(usg_thres); + if (!usg_thres_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_rm_parseFromJSON failed [usg_thres]"); + goto end; + } } notif_corre_id = cJSON_GetObjectItemCaseSensitive(events_subsc_req_data_rmJSON, "notifCorreId"); diff --git a/lib/sbi/openapi/model/exception.c b/lib/sbi/openapi/model/exception.c index de8251afa..9b337c581 100644 --- a/lib/sbi/openapi/model/exception.c +++ b/lib/sbi/openapi/model/exception.c @@ -105,6 +105,10 @@ OpenAPI_exception_t *OpenAPI_exception_parseFromJSON(cJSON *exceptionJSON) goto end; } excep_id_local_nonprim = OpenAPI_exception_id_parseFromJSON(excep_id); + if (!excep_id_local_nonprim) { + ogs_error("OpenAPI_exception_id_parseFromJSON failed [excep_id]"); + goto end; + } excep_level = cJSON_GetObjectItemCaseSensitive(exceptionJSON, "excepLevel"); if (excep_level) { @@ -117,6 +121,10 @@ OpenAPI_exception_t *OpenAPI_exception_parseFromJSON(cJSON *exceptionJSON) excep_trend = cJSON_GetObjectItemCaseSensitive(exceptionJSON, "excepTrend"); if (excep_trend) { excep_trend_local_nonprim = OpenAPI_exception_trend_parseFromJSON(excep_trend); + if (!excep_trend_local_nonprim) { + ogs_error("OpenAPI_exception_trend_parseFromJSON failed [excep_trend]"); + goto end; + } } exception_local_var = OpenAPI_exception_create ( diff --git a/lib/sbi/openapi/model/expected_ue_behavior.c b/lib/sbi/openapi/model/expected_ue_behavior.c index e21b589a1..9304d13f2 100644 --- a/lib/sbi/openapi/model/expected_ue_behavior.c +++ b/lib/sbi/openapi/model/expected_ue_behavior.c @@ -109,7 +109,6 @@ OpenAPI_expected_ue_behavior_t *OpenAPI_expected_ue_behavior_parseFromJSON(cJSON OpenAPI_user_location_t *exp_move_trajectoryItem = OpenAPI_user_location_parseFromJSON(exp_move_trajectory_local); if (!exp_move_trajectoryItem) { ogs_error("No exp_move_trajectoryItem"); - OpenAPI_list_free(exp_move_trajectoryList); goto end; } OpenAPI_list_add(exp_move_trajectoryList, exp_move_trajectoryItem); diff --git a/lib/sbi/openapi/model/expected_ue_behaviour.c b/lib/sbi/openapi/model/expected_ue_behaviour.c index 6952bfb2f..0682102d0 100644 --- a/lib/sbi/openapi/model/expected_ue_behaviour.c +++ b/lib/sbi/openapi/model/expected_ue_behaviour.c @@ -274,6 +274,10 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS stationary_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "stationaryIndication"); if (stationary_indication) { stationary_indication_local_nonprim = OpenAPI_stationary_indication_rm_parseFromJSON(stationary_indication); + if (!stationary_indication_local_nonprim) { + ogs_error("OpenAPI_stationary_indication_rm_parseFromJSON failed [stationary_indication]"); + goto end; + } } communication_duration_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "communicationDurationTime"); @@ -287,6 +291,10 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "scheduledCommunicationType"); if (scheduled_communication_type) { scheduled_communication_type_local_nonprim = OpenAPI_scheduled_communication_type_rm_parseFromJSON(scheduled_communication_type); + if (!scheduled_communication_type_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_type_rm_parseFromJSON failed [scheduled_communication_type]"); + goto end; + } } periodic_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "periodicTime"); @@ -300,6 +308,10 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "scheduledCommunicationTime"); if (scheduled_communication_time) { scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_rm_parseFromJSON(scheduled_communication_time); + if (!scheduled_communication_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_rm_parseFromJSON failed [scheduled_communication_time]"); + goto end; + } } expected_umts = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "expectedUmts"); @@ -320,7 +332,6 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local); if (!expected_umtsItem) { ogs_error("No expected_umtsItem"); - OpenAPI_list_free(expected_umtsList); goto end; } OpenAPI_list_add(expected_umtsList, expected_umtsItem); @@ -330,11 +341,19 @@ OpenAPI_expected_ue_behaviour_t *OpenAPI_expected_ue_behaviour_parseFromJSON(cJS traffic_profile = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "trafficProfile"); if (traffic_profile) { traffic_profile_local_nonprim = OpenAPI_traffic_profile_rm_parseFromJSON(traffic_profile); + if (!traffic_profile_local_nonprim) { + ogs_error("OpenAPI_traffic_profile_rm_parseFromJSON failed [traffic_profile]"); + goto end; + } } battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "batteryIndication"); if (battery_indication) { battery_indication_local_nonprim = OpenAPI_battery_indication_rm_parseFromJSON(battery_indication); + if (!battery_indication_local_nonprim) { + ogs_error("OpenAPI_battery_indication_rm_parseFromJSON failed [battery_indication]"); + goto end; + } } validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviourJSON, "validityTime"); diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data.c b/lib/sbi/openapi/model/expected_ue_behaviour_data.c index 9a75d3339..af3f0ebf7 100644 --- a/lib/sbi/openapi/model/expected_ue_behaviour_data.c +++ b/lib/sbi/openapi/model/expected_ue_behaviour_data.c @@ -211,6 +211,10 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFr scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "scheduledCommunicationTime"); if (scheduled_communication_time) { scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_communication_time); + if (!scheduled_communication_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_parseFromJSON failed [scheduled_communication_time]"); + goto end; + } } scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "scheduledCommunicationType"); @@ -240,7 +244,6 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFr OpenAPI_location_area_t *expected_umtsItem = OpenAPI_location_area_parseFromJSON(expected_umts_local); if (!expected_umtsItem) { ogs_error("No expected_umtsItem"); - OpenAPI_list_free(expected_umtsList); goto end; } OpenAPI_list_add(expected_umtsList, expected_umtsItem); @@ -259,6 +262,10 @@ OpenAPI_expected_ue_behaviour_data_t *OpenAPI_expected_ue_behaviour_data_parseFr battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "batteryIndication"); if (battery_indication) { battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication); + if (!battery_indication_local_nonprim) { + ogs_error("OpenAPI_battery_indication_parseFromJSON failed [battery_indication]"); + goto end; + } } validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_dataJSON, "validityTime"); diff --git a/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c index 755c97d8f..50373be44 100644 --- a/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c +++ b/lib/sbi/openapi/model/expected_ue_behaviour_data_1.c @@ -211,6 +211,10 @@ OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_par scheduled_communication_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "scheduledCommunicationTime"); if (scheduled_communication_time) { scheduled_communication_time_local_nonprim = OpenAPI_scheduled_communication_time_1_parseFromJSON(scheduled_communication_time); + if (!scheduled_communication_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_1_parseFromJSON failed [scheduled_communication_time]"); + goto end; + } } scheduled_communication_type = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "scheduledCommunicationType"); @@ -240,7 +244,6 @@ OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_par OpenAPI_location_area_1_t *expected_umtsItem = OpenAPI_location_area_1_parseFromJSON(expected_umts_local); if (!expected_umtsItem) { ogs_error("No expected_umtsItem"); - OpenAPI_list_free(expected_umtsList); goto end; } OpenAPI_list_add(expected_umtsList, expected_umtsItem); @@ -259,6 +262,10 @@ OpenAPI_expected_ue_behaviour_data_1_t *OpenAPI_expected_ue_behaviour_data_1_par battery_indication = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "batteryIndication"); if (battery_indication) { battery_indication_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_indication); + if (!battery_indication_local_nonprim) { + ogs_error("OpenAPI_battery_indication_parseFromJSON failed [battery_indication]"); + goto end; + } } validity_time = cJSON_GetObjectItemCaseSensitive(expected_ue_behaviour_data_1JSON, "validityTime"); diff --git a/lib/sbi/openapi/model/exposure_data_change_notification.c b/lib/sbi/openapi/model/exposure_data_change_notification.c index 8b459a462..a461c32bf 100644 --- a/lib/sbi/openapi/model/exposure_data_change_notification.c +++ b/lib/sbi/openapi/model/exposure_data_change_notification.c @@ -141,6 +141,10 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi access_and_mobility_data = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "accessAndMobilityData"); if (access_and_mobility_data) { access_and_mobility_data_local_nonprim = OpenAPI_access_and_mobility_data_parseFromJSON(access_and_mobility_data); + if (!access_and_mobility_data_local_nonprim) { + ogs_error("OpenAPI_access_and_mobility_data_parseFromJSON failed [access_and_mobility_data]"); + goto end; + } } pdu_session_management_data = cJSON_GetObjectItemCaseSensitive(exposure_data_change_notificationJSON, "pduSessionManagementData"); @@ -161,7 +165,6 @@ OpenAPI_exposure_data_change_notification_t *OpenAPI_exposure_data_change_notifi OpenAPI_pdu_session_management_data_t *pdu_session_management_dataItem = OpenAPI_pdu_session_management_data_parseFromJSON(pdu_session_management_data_local); if (!pdu_session_management_dataItem) { ogs_error("No pdu_session_management_dataItem"); - OpenAPI_list_free(pdu_session_management_dataList); goto end; } OpenAPI_list_add(pdu_session_management_dataList, pdu_session_management_dataItem); diff --git a/lib/sbi/openapi/model/ext_amf_event_subscription.c b/lib/sbi/openapi/model/ext_amf_event_subscription.c index 961e0890a..507e0a392 100644 --- a/lib/sbi/openapi/model/ext_amf_event_subscription.c +++ b/lib/sbi/openapi/model/ext_amf_event_subscription.c @@ -478,7 +478,6 @@ OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_parseFr OpenAPI_amf_event_t *event_listItem = OpenAPI_amf_event_parseFromJSON(event_list_local); if (!event_listItem) { ogs_error("No event_listItem"); - OpenAPI_list_free(event_listList); goto end; } OpenAPI_list_add(event_listList, event_listItem); @@ -657,6 +656,10 @@ OpenAPI_ext_amf_event_subscription_t *OpenAPI_ext_amf_event_subscription_parseFr options = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "options"); if (options) { options_local_nonprim = OpenAPI_amf_event_mode_parseFromJSON(options); + if (!options_local_nonprim) { + ogs_error("OpenAPI_amf_event_mode_parseFromJSON failed [options]"); + goto end; + } } source_nf_type = cJSON_GetObjectItemCaseSensitive(ext_amf_event_subscriptionJSON, "sourceNfType"); diff --git a/lib/sbi/openapi/model/ext_problem_details.c b/lib/sbi/openapi/model/ext_problem_details.c index 68cae8d21..557932cd0 100644 --- a/lib/sbi/openapi/model/ext_problem_details.c +++ b/lib/sbi/openapi/model/ext_problem_details.c @@ -300,7 +300,6 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_parseFromJSON(cJSON * OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -318,11 +317,19 @@ OpenAPI_ext_problem_details_t *OpenAPI_ext_problem_details_parseFromJSON(cJSON * access_token_error = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(ext_problem_detailsJSON, "nrfId"); diff --git a/lib/sbi/openapi/model/ext_snssai.c b/lib/sbi/openapi/model/ext_snssai.c index 7fd3955ac..99ad11735 100644 --- a/lib/sbi/openapi/model/ext_snssai.c +++ b/lib/sbi/openapi/model/ext_snssai.c @@ -162,7 +162,6 @@ OpenAPI_ext_snssai_t *OpenAPI_ext_snssai_parseFromJSON(cJSON *ext_snssaiJSON) OpenAPI_sd_range_t *sd_rangesItem = OpenAPI_sd_range_parseFromJSON(sd_ranges_local); if (!sd_rangesItem) { ogs_error("No sd_rangesItem"); - OpenAPI_list_free(sd_rangesList); goto end; } OpenAPI_list_add(sd_rangesList, sd_rangesItem); diff --git a/lib/sbi/openapi/model/extended_problem_details.c b/lib/sbi/openapi/model/extended_problem_details.c index b0c8fd986..32c161eb3 100644 --- a/lib/sbi/openapi/model/extended_problem_details.c +++ b/lib/sbi/openapi/model/extended_problem_details.c @@ -309,7 +309,6 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJS OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -327,11 +326,19 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJS access_token_error = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "nrfId"); @@ -345,6 +352,10 @@ OpenAPI_extended_problem_details_t *OpenAPI_extended_problem_details_parseFromJS acceptable_serv_info = cJSON_GetObjectItemCaseSensitive(extended_problem_detailsJSON, "acceptableServInfo"); if (acceptable_serv_info) { acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info); + if (!acceptable_serv_info_local_nonprim) { + ogs_error("OpenAPI_acceptable_service_info_parseFromJSON failed [acceptable_serv_info]"); + goto end; + } } extended_problem_details_local_var = OpenAPI_extended_problem_details_create ( diff --git a/lib/sbi/openapi/model/extended_problem_details_all_of.c b/lib/sbi/openapi/model/extended_problem_details_all_of.c index c27a43025..334b596d3 100644 --- a/lib/sbi/openapi/model/extended_problem_details_all_of.c +++ b/lib/sbi/openapi/model/extended_problem_details_all_of.c @@ -67,6 +67,10 @@ OpenAPI_extended_problem_details_all_of_t *OpenAPI_extended_problem_details_all_ acceptable_serv_info = cJSON_GetObjectItemCaseSensitive(extended_problem_details_all_ofJSON, "acceptableServInfo"); if (acceptable_serv_info) { acceptable_serv_info_local_nonprim = OpenAPI_acceptable_service_info_parseFromJSON(acceptable_serv_info); + if (!acceptable_serv_info_local_nonprim) { + ogs_error("OpenAPI_acceptable_service_info_parseFromJSON failed [acceptable_serv_info]"); + goto end; + } } extended_problem_details_all_of_local_var = OpenAPI_extended_problem_details_all_of_create ( diff --git a/lib/sbi/openapi/model/extended_sm_subs_data.c b/lib/sbi/openapi/model/extended_sm_subs_data.c index 534583d8f..f820f0602 100644 --- a/lib/sbi/openapi/model/extended_sm_subs_data.c +++ b/lib/sbi/openapi/model/extended_sm_subs_data.c @@ -138,7 +138,6 @@ OpenAPI_extended_sm_subs_data_t *OpenAPI_extended_sm_subs_data_parseFromJSON(cJS OpenAPI_session_management_subscription_data_t *individual_sm_subs_dataItem = OpenAPI_session_management_subscription_data_parseFromJSON(individual_sm_subs_data_local); if (!individual_sm_subs_dataItem) { ogs_error("No individual_sm_subs_dataItem"); - OpenAPI_list_free(individual_sm_subs_dataList); goto end; } OpenAPI_list_add(individual_sm_subs_dataList, individual_sm_subs_dataItem); diff --git a/lib/sbi/openapi/model/external_unrelated_class.c b/lib/sbi/openapi/model/external_unrelated_class.c index 09e253618..0b7c27807 100644 --- a/lib/sbi/openapi/model/external_unrelated_class.c +++ b/lib/sbi/openapi/model/external_unrelated_class.c @@ -142,7 +142,6 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_parseFromJS OpenAPI_lcs_client_external_t *lcs_client_externalsItem = OpenAPI_lcs_client_external_parseFromJSON(lcs_client_externals_local); if (!lcs_client_externalsItem) { ogs_error("No lcs_client_externalsItem"); - OpenAPI_list_free(lcs_client_externalsList); goto end; } OpenAPI_list_add(lcs_client_externalsList, lcs_client_externalsItem); @@ -167,7 +166,6 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_parseFromJS OpenAPI_af_external_t *af_externalsItem = OpenAPI_af_external_parseFromJSON(af_externals_local); if (!af_externalsItem) { ogs_error("No af_externalsItem"); - OpenAPI_list_free(af_externalsList); goto end; } OpenAPI_list_add(af_externalsList, af_externalsItem); @@ -192,7 +190,6 @@ OpenAPI_external_unrelated_class_t *OpenAPI_external_unrelated_class_parseFromJS OpenAPI_lcs_client_group_external_t *lcs_client_group_externalsItem = OpenAPI_lcs_client_group_external_parseFromJSON(lcs_client_group_externals_local); if (!lcs_client_group_externalsItem) { ogs_error("No lcs_client_group_externalsItem"); - OpenAPI_list_free(lcs_client_group_externalsList); goto end; } OpenAPI_list_add(lcs_client_group_externalsList, lcs_client_group_externalsItem); diff --git a/lib/sbi/openapi/model/failure_event_info.c b/lib/sbi/openapi/model/failure_event_info.c index 204853b3d..91b75286c 100644 --- a/lib/sbi/openapi/model/failure_event_info.c +++ b/lib/sbi/openapi/model/failure_event_info.c @@ -95,6 +95,10 @@ OpenAPI_failure_event_info_t *OpenAPI_failure_event_info_parseFromJSON(cJSON *fa goto end; } event_local_nonprim = OpenAPI_nwdaf_event_parseFromJSON(event); + if (!event_local_nonprim) { + ogs_error("OpenAPI_nwdaf_event_parseFromJSON failed [event]"); + goto end; + } failure_code = cJSON_GetObjectItemCaseSensitive(failure_event_infoJSON, "failureCode"); if (!failure_code) { @@ -102,6 +106,10 @@ OpenAPI_failure_event_info_t *OpenAPI_failure_event_info_parseFromJSON(cJSON *fa goto end; } failure_code_local_nonprim = OpenAPI_nwdaf_failure_code_parseFromJSON(failure_code); + if (!failure_code_local_nonprim) { + ogs_error("OpenAPI_nwdaf_failure_code_parseFromJSON failed [failure_code]"); + goto end; + } failure_event_info_local_var = OpenAPI_failure_event_info_create ( event_local_nonprim, diff --git a/lib/sbi/openapi/model/flow_information.c b/lib/sbi/openapi/model/flow_information.c index d87f4ac04..de6b8f054 100644 --- a/lib/sbi/openapi/model/flow_information.c +++ b/lib/sbi/openapi/model/flow_information.c @@ -168,6 +168,10 @@ OpenAPI_flow_information_t *OpenAPI_flow_information_parseFromJSON(cJSON *flow_i eth_flow_description = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "ethFlowDescription"); if (eth_flow_description) { eth_flow_description_local_nonprim = OpenAPI_eth_flow_description_parseFromJSON(eth_flow_description); + if (!eth_flow_description_local_nonprim) { + ogs_error("OpenAPI_eth_flow_description_parseFromJSON failed [eth_flow_description]"); + goto end; + } } pack_filt_id = cJSON_GetObjectItemCaseSensitive(flow_informationJSON, "packFiltId"); diff --git a/lib/sbi/openapi/model/gad_shape.c b/lib/sbi/openapi/model/gad_shape.c index 1cd110d12..0b7e60b38 100644 --- a/lib/sbi/openapi/model/gad_shape.c +++ b/lib/sbi/openapi/model/gad_shape.c @@ -72,6 +72,10 @@ OpenAPI_gad_shape_t *OpenAPI_gad_shape_parseFromJSON(cJSON *gad_shapeJSON) goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } gad_shape_local_var = OpenAPI_gad_shape_create ( shape_local_nonprim diff --git a/lib/sbi/openapi/model/gba_authentication_info_request.c b/lib/sbi/openapi/model/gba_authentication_info_request.c index 37d458078..29525ca9b 100644 --- a/lib/sbi/openapi/model/gba_authentication_info_request.c +++ b/lib/sbi/openapi/model/gba_authentication_info_request.c @@ -105,6 +105,10 @@ OpenAPI_gba_authentication_info_request_t *OpenAPI_gba_authentication_info_reque resynchronization_info = cJSON_GetObjectItemCaseSensitive(gba_authentication_info_requestJSON, "resynchronizationInfo"); if (resynchronization_info) { resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_1_parseFromJSON(resynchronization_info); + if (!resynchronization_info_local_nonprim) { + ogs_error("OpenAPI_resynchronization_info_1_parseFromJSON failed [resynchronization_info]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(gba_authentication_info_requestJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/gba_authentication_info_result.c b/lib/sbi/openapi/model/gba_authentication_info_result.c index 93af383d1..c0d74ea9d 100644 --- a/lib/sbi/openapi/model/gba_authentication_info_result.c +++ b/lib/sbi/openapi/model/gba_authentication_info_result.c @@ -81,6 +81,10 @@ OpenAPI_gba_authentication_info_result_t *OpenAPI_gba_authentication_info_result _3g_aka_av = cJSON_GetObjectItemCaseSensitive(gba_authentication_info_resultJSON, "3gAkaAv"); if (_3g_aka_av) { _3g_aka_av_local_nonprim = OpenAPI_model_3_g_aka_av_parseFromJSON(_3g_aka_av); + if (!_3g_aka_av_local_nonprim) { + ogs_error("OpenAPI_model_3_g_aka_av_parseFromJSON failed [_3g_aka_av]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(gba_authentication_info_resultJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/gbr_qos_flow_information.c b/lib/sbi/openapi/model/gbr_qos_flow_information.c index f00c25a1b..645b96152 100644 --- a/lib/sbi/openapi/model/gbr_qos_flow_information.c +++ b/lib/sbi/openapi/model/gbr_qos_flow_information.c @@ -252,7 +252,6 @@ OpenAPI_gbr_qos_flow_information_t *OpenAPI_gbr_qos_flow_information_parseFromJS OpenAPI_alternative_qos_profile_t *alternative_qos_profile_listItem = OpenAPI_alternative_qos_profile_parseFromJSON(alternative_qos_profile_list_local); if (!alternative_qos_profile_listItem) { ogs_error("No alternative_qos_profile_listItem"); - OpenAPI_list_free(alternative_qos_profile_listList); goto end; } OpenAPI_list_add(alternative_qos_profile_listList, alternative_qos_profile_listItem); diff --git a/lib/sbi/openapi/model/geo_service_area.c b/lib/sbi/openapi/model/geo_service_area.c index 25d8b953b..702bdb6fe 100644 --- a/lib/sbi/openapi/model/geo_service_area.c +++ b/lib/sbi/openapi/model/geo_service_area.c @@ -115,7 +115,6 @@ OpenAPI_geo_service_area_t *OpenAPI_geo_service_area_parseFromJSON(cJSON *geo_se OpenAPI_geographic_area_t *geographic_area_listItem = OpenAPI_geographic_area_parseFromJSON(geographic_area_list_local); if (!geographic_area_listItem) { ogs_error("No geographic_area_listItem"); - OpenAPI_list_free(geographic_area_listList); goto end; } OpenAPI_list_add(geographic_area_listList, geographic_area_listItem); @@ -140,7 +139,6 @@ OpenAPI_geo_service_area_t *OpenAPI_geo_service_area_parseFromJSON(cJSON *geo_se OpenAPI_civic_address_t *civic_address_listItem = OpenAPI_civic_address_parseFromJSON(civic_address_list_local); if (!civic_address_listItem) { ogs_error("No civic_address_listItem"); - OpenAPI_list_free(civic_address_listList); goto end; } OpenAPI_list_add(civic_address_listList, civic_address_listItem); diff --git a/lib/sbi/openapi/model/geo_service_area_1.c b/lib/sbi/openapi/model/geo_service_area_1.c index 1c2128bc0..dc95dbd6a 100644 --- a/lib/sbi/openapi/model/geo_service_area_1.c +++ b/lib/sbi/openapi/model/geo_service_area_1.c @@ -115,7 +115,6 @@ OpenAPI_geo_service_area_1_t *OpenAPI_geo_service_area_1_parseFromJSON(cJSON *ge OpenAPI_geographic_area_t *geographic_area_listItem = OpenAPI_geographic_area_parseFromJSON(geographic_area_list_local); if (!geographic_area_listItem) { ogs_error("No geographic_area_listItem"); - OpenAPI_list_free(geographic_area_listList); goto end; } OpenAPI_list_add(geographic_area_listList, geographic_area_listItem); @@ -140,7 +139,6 @@ OpenAPI_geo_service_area_1_t *OpenAPI_geo_service_area_1_parseFromJSON(cJSON *ge OpenAPI_civic_address_t *civic_address_listItem = OpenAPI_civic_address_parseFromJSON(civic_address_list_local); if (!civic_address_listItem) { ogs_error("No civic_address_listItem"); - OpenAPI_list_free(civic_address_listList); goto end; } OpenAPI_list_add(civic_address_listList, civic_address_listItem); diff --git a/lib/sbi/openapi/model/geographic_area.c b/lib/sbi/openapi/model/geographic_area.c index d88b7962f..313819e0b 100644 --- a/lib/sbi/openapi/model/geographic_area.c +++ b/lib/sbi/openapi/model/geographic_area.c @@ -211,6 +211,10 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "point"); if (!point) { @@ -218,6 +222,10 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } uncertainty = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "uncertainty"); if (!uncertainty) { @@ -235,6 +243,10 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(geographic_areaJSON, "confidence"); if (!confidence) { @@ -267,7 +279,6 @@ OpenAPI_geographic_area_t *OpenAPI_geographic_area_parseFromJSON(cJSON *geograph OpenAPI_geographical_coordinates_t *point_listItem = OpenAPI_geographical_coordinates_parseFromJSON(point_list_local); if (!point_listItem) { ogs_error("No point_listItem"); - OpenAPI_list_free(point_listList); goto end; } OpenAPI_list_add(point_listList, point_listItem); diff --git a/lib/sbi/openapi/model/geographical_area.c b/lib/sbi/openapi/model/geographical_area.c index db5e16b34..7e477f8f8 100644 --- a/lib/sbi/openapi/model/geographical_area.c +++ b/lib/sbi/openapi/model/geographical_area.c @@ -88,11 +88,19 @@ OpenAPI_geographical_area_t *OpenAPI_geographical_area_parseFromJSON(cJSON *geog civic_address = cJSON_GetObjectItemCaseSensitive(geographical_areaJSON, "civicAddress"); if (civic_address) { civic_address_local_nonprim = OpenAPI_civic_address_parseFromJSON(civic_address); + if (!civic_address_local_nonprim) { + ogs_error("OpenAPI_civic_address_parseFromJSON failed [civic_address]"); + goto end; + } } shapes = cJSON_GetObjectItemCaseSensitive(geographical_areaJSON, "shapes"); if (shapes) { shapes_local_nonprim = OpenAPI_geographic_area_parseFromJSON(shapes); + if (!shapes_local_nonprim) { + ogs_error("OpenAPI_geographic_area_parseFromJSON failed [shapes]"); + goto end; + } } geographical_area_local_var = OpenAPI_geographical_area_create ( diff --git a/lib/sbi/openapi/model/gera_location.c b/lib/sbi/openapi/model/gera_location.c index cbe1c7dd2..a66ec65a4 100644 --- a/lib/sbi/openapi/model/gera_location.c +++ b/lib/sbi/openapi/model/gera_location.c @@ -234,21 +234,37 @@ OpenAPI_gera_location_t *OpenAPI_gera_location_parseFromJSON(cJSON *gera_locatio cgi = cJSON_GetObjectItemCaseSensitive(gera_locationJSON, "cgi"); if (cgi) { cgi_local_nonprim = OpenAPI_cell_global_id_parseFromJSON(cgi); + if (!cgi_local_nonprim) { + ogs_error("OpenAPI_cell_global_id_parseFromJSON failed [cgi]"); + goto end; + } } rai = cJSON_GetObjectItemCaseSensitive(gera_locationJSON, "rai"); if (rai) { rai_local_nonprim = OpenAPI_routing_area_id_parseFromJSON(rai); + if (!rai_local_nonprim) { + ogs_error("OpenAPI_routing_area_id_parseFromJSON failed [rai]"); + goto end; + } } sai = cJSON_GetObjectItemCaseSensitive(gera_locationJSON, "sai"); if (sai) { sai_local_nonprim = OpenAPI_service_area_id_parseFromJSON(sai); + if (!sai_local_nonprim) { + ogs_error("OpenAPI_service_area_id_parseFromJSON failed [sai]"); + goto end; + } } lai = cJSON_GetObjectItemCaseSensitive(gera_locationJSON, "lai"); if (lai) { lai_local_nonprim = OpenAPI_location_area_id_parseFromJSON(lai); + if (!lai_local_nonprim) { + ogs_error("OpenAPI_location_area_id_parseFromJSON failed [lai]"); + goto end; + } } vlr_number = cJSON_GetObjectItemCaseSensitive(gera_locationJSON, "vlrNumber"); diff --git a/lib/sbi/openapi/model/global_ran_node_id.c b/lib/sbi/openapi/model/global_ran_node_id.c index 7d6a15f31..29d56de28 100644 --- a/lib/sbi/openapi/model/global_ran_node_id.c +++ b/lib/sbi/openapi/model/global_ran_node_id.c @@ -177,6 +177,10 @@ OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_parseFromJSON(cJSON *gl goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } n3_iwf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "n3IwfId"); if (n3_iwf_id) { @@ -189,6 +193,10 @@ OpenAPI_global_ran_node_id_t *OpenAPI_global_ran_node_id_parseFromJSON(cJSON *gl g_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "gNbId"); if (g_nb_id) { g_nb_id_local_nonprim = OpenAPI_gnb_id_parseFromJSON(g_nb_id); + if (!g_nb_id_local_nonprim) { + ogs_error("OpenAPI_gnb_id_parseFromJSON failed [g_nb_id]"); + goto end; + } } nge_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_idJSON, "ngeNbId"); diff --git a/lib/sbi/openapi/model/global_ran_node_id_1.c b/lib/sbi/openapi/model/global_ran_node_id_1.c index 8bb88d380..f23ea34e0 100644 --- a/lib/sbi/openapi/model/global_ran_node_id_1.c +++ b/lib/sbi/openapi/model/global_ran_node_id_1.c @@ -177,6 +177,10 @@ OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_parseFromJSON(cJSON goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } n3_iwf_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "n3IwfId"); if (n3_iwf_id) { @@ -189,6 +193,10 @@ OpenAPI_global_ran_node_id_1_t *OpenAPI_global_ran_node_id_1_parseFromJSON(cJSON g_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "gNbId"); if (g_nb_id) { g_nb_id_local_nonprim = OpenAPI_gnb_id_parseFromJSON(g_nb_id); + if (!g_nb_id_local_nonprim) { + ogs_error("OpenAPI_gnb_id_parseFromJSON failed [g_nb_id]"); + goto end; + } } nge_nb_id = cJSON_GetObjectItemCaseSensitive(global_ran_node_id_1JSON, "ngeNbId"); diff --git a/lib/sbi/openapi/model/gmlc_info.c b/lib/sbi/openapi/model/gmlc_info.c index f6f9a958d..1dabd5623 100644 --- a/lib/sbi/openapi/model/gmlc_info.c +++ b/lib/sbi/openapi/model/gmlc_info.c @@ -113,7 +113,6 @@ OpenAPI_gmlc_info_t *OpenAPI_gmlc_info_parseFromJSON(cJSON *gmlc_infoJSON) OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local); if (!serving_client_typesItem) { ogs_error("No serving_client_typesItem"); - OpenAPI_list_free(serving_client_typesList); goto end; } OpenAPI_list_add(serving_client_typesList, serving_client_typesItem); diff --git a/lib/sbi/openapi/model/group_identifiers.c b/lib/sbi/openapi/model/group_identifiers.c index 099cb89c6..ae8cc8c09 100644 --- a/lib/sbi/openapi/model/group_identifiers.c +++ b/lib/sbi/openapi/model/group_identifiers.c @@ -132,7 +132,6 @@ OpenAPI_group_identifiers_t *OpenAPI_group_identifiers_parseFromJSON(cJSON *grou OpenAPI_ue_id_t *ue_id_listItem = OpenAPI_ue_id_parseFromJSON(ue_id_list_local); if (!ue_id_listItem) { ogs_error("No ue_id_listItem"); - OpenAPI_list_free(ue_id_listList); goto end; } OpenAPI_list_add(ue_id_listList, ue_id_listItem); diff --git a/lib/sbi/openapi/model/guami.c b/lib/sbi/openapi/model/guami.c index bf9aae7ac..89a2138ea 100644 --- a/lib/sbi/openapi/model/guami.c +++ b/lib/sbi/openapi/model/guami.c @@ -88,6 +88,10 @@ OpenAPI_guami_t *OpenAPI_guami_parseFromJSON(cJSON *guamiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [plmn_id]"); + goto end; + } amf_id = cJSON_GetObjectItemCaseSensitive(guamiJSON, "amfId"); if (!amf_id) { diff --git a/lib/sbi/openapi/model/guami_list_cond.c b/lib/sbi/openapi/model/guami_list_cond.c index a38953a1f..44bdee071 100644 --- a/lib/sbi/openapi/model/guami_list_cond.c +++ b/lib/sbi/openapi/model/guami_list_cond.c @@ -93,7 +93,6 @@ OpenAPI_guami_list_cond_t *OpenAPI_guami_list_cond_parseFromJSON(cJSON *guami_li OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); diff --git a/lib/sbi/openapi/model/hsmf_update_data.c b/lib/sbi/openapi/model/hsmf_update_data.c index 404e71e8e..b566ef42a 100644 --- a/lib/sbi/openapi/model/hsmf_update_data.c +++ b/lib/sbi/openapi/model/hsmf_update_data.c @@ -1174,21 +1174,37 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u vcn_tunnel_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "vcnTunnelInfo"); if (vcn_tunnel_info) { vcn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(vcn_tunnel_info); + if (!vcn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [vcn_tunnel_info]"); + goto end; + } } icn_tunnel_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "icnTunnelInfo"); if (icn_tunnel_info) { icn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(icn_tunnel_info); + if (!icn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [icn_tunnel_info]"); + goto end; + } } additional_cn_tunnel_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "additionalCnTunnelInfo"); if (additional_cn_tunnel_info) { additional_cn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(additional_cn_tunnel_info); + if (!additional_cn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [additional_cn_tunnel_info]"); + goto end; + } } serving_network = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } an_type = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "anType"); @@ -1221,6 +1237,10 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u ue_location = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "ueTimeZone"); @@ -1234,6 +1254,10 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u add_ue_location = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } pause_charging = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "pauseCharging"); @@ -1255,11 +1279,19 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u n1_sm_info_from_ue = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "n1SmInfoFromUe"); if (n1_sm_info_from_ue) { n1_sm_info_from_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_from_ue); + if (!n1_sm_info_from_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_from_ue]"); + goto end; + } } unknown_n1_sm_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "unknownN1SmInfo"); if (unknown_n1_sm_info) { unknown_n1_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(unknown_n1_sm_info); + if (!unknown_n1_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [unknown_n1_sm_info]"); + goto end; + } } qos_flows_rel_notify_list = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "qosFlowsRelNotifyList"); @@ -1280,7 +1312,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_qos_flow_item_t *qos_flows_rel_notify_listItem = OpenAPI_qos_flow_item_parseFromJSON(qos_flows_rel_notify_list_local); if (!qos_flows_rel_notify_listItem) { ogs_error("No qos_flows_rel_notify_listItem"); - OpenAPI_list_free(qos_flows_rel_notify_listList); goto end; } OpenAPI_list_add(qos_flows_rel_notify_listList, qos_flows_rel_notify_listItem); @@ -1305,7 +1336,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_qos_flow_notify_item_t *qos_flows_notify_listItem = OpenAPI_qos_flow_notify_item_parseFromJSON(qos_flows_notify_list_local); if (!qos_flows_notify_listItem) { ogs_error("No qos_flows_notify_listItem"); - OpenAPI_list_free(qos_flows_notify_listList); goto end; } OpenAPI_list_add(qos_flows_notify_listList, qos_flows_notify_listItem); @@ -1330,7 +1360,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_pdu_session_notify_item_t *notify_listItem = OpenAPI_pdu_session_notify_item_parseFromJSON(notify_list_local); if (!notify_listItem) { ogs_error("No notify_listItem"); - OpenAPI_list_free(notify_listList); goto end; } OpenAPI_list_add(notify_listList, notify_listItem); @@ -1411,6 +1440,10 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u ng_ap_cause = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause_value = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "5gMmCauseValue"); @@ -1456,7 +1489,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_secondary_rat_usage_report_t *secondary_rat_usage_reportItem = OpenAPI_secondary_rat_usage_report_parseFromJSON(secondary_rat_usage_report_local); if (!secondary_rat_usage_reportItem) { ogs_error("No secondary_rat_usage_reportItem"); - OpenAPI_list_free(secondary_rat_usage_reportList); goto end; } OpenAPI_list_add(secondary_rat_usage_reportList, secondary_rat_usage_reportItem); @@ -1481,7 +1513,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_secondary_rat_usage_info_t *secondary_rat_usage_infoItem = OpenAPI_secondary_rat_usage_info_parseFromJSON(secondary_rat_usage_info_local); if (!secondary_rat_usage_infoItem) { ogs_error("No secondary_rat_usage_infoItem"); - OpenAPI_list_free(secondary_rat_usage_infoList); goto end; } OpenAPI_list_add(secondary_rat_usage_infoList, secondary_rat_usage_infoItem); @@ -1548,7 +1579,6 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u OpenAPI_psa_information_t *psa_infoItem = OpenAPI_psa_information_parseFromJSON(psa_info_local); if (!psa_infoItem) { ogs_error("No psa_infoItem"); - OpenAPI_list_free(psa_infoList); goto end; } OpenAPI_list_add(psa_infoList, psa_infoItem); @@ -1558,21 +1588,37 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u ulcl_bp_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "ulclBpInfo"); if (ulcl_bp_info) { ulcl_bp_info_local_nonprim = OpenAPI_ulcl_bp_information_parseFromJSON(ulcl_bp_info); + if (!ulcl_bp_info_local_nonprim) { + ogs_error("OpenAPI_ulcl_bp_information_parseFromJSON failed [ulcl_bp_info]"); + goto end; + } } n4_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } presence_in_ladn = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "presenceInLadn"); @@ -1672,26 +1718,46 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u roaming_charging_profile = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "roamingChargingProfile"); if (roaming_charging_profile) { roaming_charging_profile_local_nonprim = OpenAPI_roaming_charging_profile_parseFromJSON(roaming_charging_profile); + if (!roaming_charging_profile_local_nonprim) { + ogs_error("OpenAPI_roaming_charging_profile_parseFromJSON failed [roaming_charging_profile]"); + goto end; + } } mo_exp_data_counter = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "moExpDataCounter"); if (mo_exp_data_counter) { mo_exp_data_counter_local_nonprim = OpenAPI_mo_exp_data_counter_parseFromJSON(mo_exp_data_counter); + if (!mo_exp_data_counter_local_nonprim) { + ogs_error("OpenAPI_mo_exp_data_counter_parseFromJSON failed [mo_exp_data_counter]"); + goto end; + } } vplmn_qos = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "vplmnQos"); if (vplmn_qos) { vplmn_qos_local_nonprim = OpenAPI_vplmn_qos_parseFromJSON(vplmn_qos); + if (!vplmn_qos_local_nonprim) { + ogs_error("OpenAPI_vplmn_qos_parseFromJSON failed [vplmn_qos]"); + goto end; + } } security_result = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "securityResult"); if (security_result) { security_result_local_nonprim = OpenAPI_security_result_parseFromJSON(security_result); + if (!security_result_local_nonprim) { + ogs_error("OpenAPI_security_result_parseFromJSON failed [security_result]"); + goto end; + } } up_security_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "upSecurityInfo"); if (up_security_info) { up_security_info_local_nonprim = OpenAPI_up_security_info_parseFromJSON(up_security_info); + if (!up_security_info_local_nonprim) { + ogs_error("OpenAPI_up_security_info_parseFromJSON failed [up_security_info]"); + goto end; + } } amf_nf_id = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "amfNfId"); @@ -1705,6 +1771,10 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u guami = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } secondary_rat_usage_data_report_container = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "secondaryRatUsageDataReportContainer"); @@ -1740,6 +1810,10 @@ OpenAPI_hsmf_update_data_t *OpenAPI_hsmf_update_data_parseFromJSON(cJSON *hsmf_u pcf_ue_callback_info = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "pcfUeCallbackInfo"); if (pcf_ue_callback_info) { pcf_ue_callback_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_callback_info); + if (!pcf_ue_callback_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_callback_info]"); + goto end; + } } satellite_backhaul_cat = cJSON_GetObjectItemCaseSensitive(hsmf_update_dataJSON, "satelliteBackhaulCat"); diff --git a/lib/sbi/openapi/model/hsmf_update_error.c b/lib/sbi/openapi/model/hsmf_update_error.c index 01693fc6b..742b62ba9 100644 --- a/lib/sbi/openapi/model/hsmf_update_error.c +++ b/lib/sbi/openapi/model/hsmf_update_error.c @@ -145,6 +145,10 @@ OpenAPI_hsmf_update_error_t *OpenAPI_hsmf_update_error_parseFromJSON(cJSON *hsmf goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } pti = cJSON_GetObjectItemCaseSensitive(hsmf_update_errorJSON, "pti"); if (pti) { @@ -165,6 +169,10 @@ OpenAPI_hsmf_update_error_t *OpenAPI_hsmf_update_error_parseFromJSON(cJSON *hsmf n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(hsmf_update_errorJSON, "n1SmInfoToUe"); if (n1_sm_info_to_ue) { n1_sm_info_to_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_to_ue); + if (!n1_sm_info_to_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_to_ue]"); + goto end; + } } back_off_timer = cJSON_GetObjectItemCaseSensitive(hsmf_update_errorJSON, "backOffTimer"); diff --git a/lib/sbi/openapi/model/hsmf_updated_data.c b/lib/sbi/openapi/model/hsmf_updated_data.c index d337284db..b2310813b 100644 --- a/lib/sbi/openapi/model/hsmf_updated_data.c +++ b/lib/sbi/openapi/model/hsmf_updated_data.c @@ -395,21 +395,37 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "n1SmInfoToUe"); if (n1_sm_info_to_ue) { n1_sm_info_to_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_to_ue); + if (!n1_sm_info_to_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_to_ue]"); + goto end; + } } n4_info = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } dnai_list = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "dnaiList"); @@ -444,6 +460,10 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf roaming_charging_profile = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "roamingChargingProfile"); if (roaming_charging_profile) { roaming_charging_profile_local_nonprim = OpenAPI_roaming_charging_profile_parseFromJSON(roaming_charging_profile); + if (!roaming_charging_profile_local_nonprim) { + ogs_error("OpenAPI_roaming_charging_profile_parseFromJSON failed [roaming_charging_profile]"); + goto end; + } } home_provided_charging_id = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "homeProvidedChargingId"); @@ -457,6 +477,10 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf up_security = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "upSecurity"); if (up_security) { up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_parseFromJSON failed [up_security]"); + goto end; + } } max_integrity_protected_data_rate_ul = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "maxIntegrityProtectedDataRateUl"); @@ -503,7 +527,6 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf OpenAPI_qos_flow_setup_item_t *qos_flows_setup_listItem = OpenAPI_qos_flow_setup_item_parseFromJSON(qos_flows_setup_list_local); if (!qos_flows_setup_listItem) { ogs_error("No qos_flows_setup_listItem"); - OpenAPI_list_free(qos_flows_setup_listList); goto end; } OpenAPI_list_add(qos_flows_setup_listList, qos_flows_setup_listItem); @@ -513,11 +536,19 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf session_ambr = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } } eps_pdn_cnx_info = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "epsPdnCnxInfo"); if (eps_pdn_cnx_info) { eps_pdn_cnx_info_local_nonprim = OpenAPI_eps_pdn_cnx_info_parseFromJSON(eps_pdn_cnx_info); + if (!eps_pdn_cnx_info_local_nonprim) { + ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON failed [eps_pdn_cnx_info]"); + goto end; + } } eps_bearer_info = cJSON_GetObjectItemCaseSensitive(hsmf_updated_dataJSON, "epsBearerInfo"); @@ -538,7 +569,6 @@ OpenAPI_hsmf_updated_data_t *OpenAPI_hsmf_updated_data_parseFromJSON(cJSON *hsmf OpenAPI_eps_bearer_info_t *eps_bearer_infoItem = OpenAPI_eps_bearer_info_parseFromJSON(eps_bearer_info_local); if (!eps_bearer_infoItem) { ogs_error("No eps_bearer_infoItem"); - OpenAPI_list_free(eps_bearer_infoList); goto end; } OpenAPI_list_add(eps_bearer_infoList, eps_bearer_infoItem); diff --git a/lib/sbi/openapi/model/hss_authentication_info_request.c b/lib/sbi/openapi/model/hss_authentication_info_request.c index b27553927..4c5e05eea 100644 --- a/lib/sbi/openapi/model/hss_authentication_info_request.c +++ b/lib/sbi/openapi/model/hss_authentication_info_request.c @@ -183,11 +183,19 @@ OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_reque serving_network_id = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "servingNetworkId"); if (serving_network_id) { serving_network_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(serving_network_id); + if (!serving_network_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [serving_network_id]"); + goto end; + } } resynchronization_info = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "resynchronizationInfo"); if (resynchronization_info) { resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info); + if (!resynchronization_info_local_nonprim) { + ogs_error("OpenAPI_resynchronization_info_parseFromJSON failed [resynchronization_info]"); + goto end; + } } an_id = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "anId"); diff --git a/lib/sbi/openapi/model/hss_authentication_info_result.c b/lib/sbi/openapi/model/hss_authentication_info_result.c index aa6948ed8..4a79ee06d 100644 --- a/lib/sbi/openapi/model/hss_authentication_info_result.c +++ b/lib/sbi/openapi/model/hss_authentication_info_result.c @@ -94,6 +94,10 @@ OpenAPI_hss_authentication_info_result_t *OpenAPI_hss_authentication_info_result goto end; } hss_authentication_vectors_local_nonprim = OpenAPI_hss_authentication_vectors_parseFromJSON(hss_authentication_vectors); + if (!hss_authentication_vectors_local_nonprim) { + ogs_error("OpenAPI_hss_authentication_vectors_parseFromJSON failed [hss_authentication_vectors]"); + goto end; + } hss_authentication_info_result_local_var = OpenAPI_hss_authentication_info_result_create ( supported_features && !cJSON_IsNull(supported_features) ? ogs_strdup(supported_features->valuestring) : NULL, diff --git a/lib/sbi/openapi/model/hss_info.c b/lib/sbi/openapi/model/hss_info.c index d8cd7cf56..5881f9223 100644 --- a/lib/sbi/openapi/model/hss_info.c +++ b/lib/sbi/openapi/model/hss_info.c @@ -239,7 +239,6 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) OpenAPI_imsi_range_t *imsi_rangesItem = OpenAPI_imsi_range_parseFromJSON(imsi_ranges_local); if (!imsi_rangesItem) { ogs_error("No imsi_rangesItem"); - OpenAPI_list_free(imsi_rangesList); goto end; } OpenAPI_list_add(imsi_rangesList, imsi_rangesItem); @@ -264,7 +263,6 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) OpenAPI_identity_range_t *ims_private_identity_rangesItem = OpenAPI_identity_range_parseFromJSON(ims_private_identity_ranges_local); if (!ims_private_identity_rangesItem) { ogs_error("No ims_private_identity_rangesItem"); - OpenAPI_list_free(ims_private_identity_rangesList); goto end; } OpenAPI_list_add(ims_private_identity_rangesList, ims_private_identity_rangesItem); @@ -289,7 +287,6 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) OpenAPI_identity_range_t *ims_public_identity_rangesItem = OpenAPI_identity_range_parseFromJSON(ims_public_identity_ranges_local); if (!ims_public_identity_rangesItem) { ogs_error("No ims_public_identity_rangesItem"); - OpenAPI_list_free(ims_public_identity_rangesList); goto end; } OpenAPI_list_add(ims_public_identity_rangesList, ims_public_identity_rangesItem); @@ -314,7 +311,6 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) OpenAPI_identity_range_t *msisdn_rangesItem = OpenAPI_identity_range_parseFromJSON(msisdn_ranges_local); if (!msisdn_rangesItem) { ogs_error("No msisdn_rangesItem"); - OpenAPI_list_free(msisdn_rangesList); goto end; } OpenAPI_list_add(msisdn_rangesList, msisdn_rangesItem); @@ -339,7 +335,6 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -349,6 +344,10 @@ OpenAPI_hss_info_t *OpenAPI_hss_info_parseFromJSON(cJSON *hss_infoJSON) hss_diameter_address = cJSON_GetObjectItemCaseSensitive(hss_infoJSON, "hssDiameterAddress"); if (hss_diameter_address) { hss_diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_parseFromJSON(hss_diameter_address); + if (!hss_diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_parseFromJSON failed [hss_diameter_address]"); + goto end; + } } hss_info_local_var = OpenAPI_hss_info_create ( diff --git a/lib/sbi/openapi/model/hss_subscription_info.c b/lib/sbi/openapi/model/hss_subscription_info.c index a654c8361..7d67ea7c7 100644 --- a/lib/sbi/openapi/model/hss_subscription_info.c +++ b/lib/sbi/openapi/model/hss_subscription_info.c @@ -93,7 +93,6 @@ OpenAPI_hss_subscription_info_t *OpenAPI_hss_subscription_info_parseFromJSON(cJS OpenAPI_hss_subscription_item_t *hss_subscription_listItem = OpenAPI_hss_subscription_item_parseFromJSON(hss_subscription_list_local); if (!hss_subscription_listItem) { ogs_error("No hss_subscription_listItem"); - OpenAPI_list_free(hss_subscription_listList); goto end; } OpenAPI_list_add(hss_subscription_listList, hss_subscription_listItem); diff --git a/lib/sbi/openapi/model/hss_subscription_item.c b/lib/sbi/openapi/model/hss_subscription_item.c index b34375250..db7ca667e 100644 --- a/lib/sbi/openapi/model/hss_subscription_item.c +++ b/lib/sbi/openapi/model/hss_subscription_item.c @@ -119,6 +119,10 @@ OpenAPI_hss_subscription_item_t *OpenAPI_hss_subscription_item_parseFromJSON(cJS context_info = cJSON_GetObjectItemCaseSensitive(hss_subscription_itemJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } hss_subscription_item_local_var = OpenAPI_hss_subscription_item_create ( diff --git a/lib/sbi/openapi/model/immediate_mdt_conf.c b/lib/sbi/openapi/model/immediate_mdt_conf.c index 1682ebeef..20cd0884b 100644 --- a/lib/sbi/openapi/model/immediate_mdt_conf.c +++ b/lib/sbi/openapi/model/immediate_mdt_conf.c @@ -496,6 +496,10 @@ OpenAPI_immediate_mdt_conf_t *OpenAPI_immediate_mdt_conf_parseFromJSON(cJSON *im area_scope = cJSON_GetObjectItemCaseSensitive(immediate_mdt_confJSON, "areaScope"); if (area_scope) { area_scope_local_nonprim = OpenAPI_area_scope_parseFromJSON(area_scope); + if (!area_scope_local_nonprim) { + ogs_error("OpenAPI_area_scope_parseFromJSON failed [area_scope]"); + goto end; + } } positioning_method = cJSON_GetObjectItemCaseSensitive(immediate_mdt_confJSON, "positioningMethod"); @@ -544,7 +548,6 @@ OpenAPI_immediate_mdt_conf_t *OpenAPI_immediate_mdt_conf_parseFromJSON(cJSON *im OpenAPI_plmn_id_t *mdt_allowed_plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(mdt_allowed_plmn_id_list_local); if (!mdt_allowed_plmn_id_listItem) { ogs_error("No mdt_allowed_plmn_id_listItem"); - OpenAPI_list_free(mdt_allowed_plmn_id_listList); goto end; } OpenAPI_list_add(mdt_allowed_plmn_id_listList, mdt_allowed_plmn_id_listItem); diff --git a/lib/sbi/openapi/model/immediate_report.c b/lib/sbi/openapi/model/immediate_report.c index fa1dde62e..4b29c5a2d 100644 --- a/lib/sbi/openapi/model/immediate_report.c +++ b/lib/sbi/openapi/model/immediate_report.c @@ -382,81 +382,145 @@ OpenAPI_immediate_report_t *OpenAPI_immediate_report_parseFromJSON(cJSON *immedi am_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "amData"); if (am_data) { am_data_local_nonprim = OpenAPI_access_and_mobility_subscription_data_parseFromJSON(am_data); + if (!am_data_local_nonprim) { + ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON failed [am_data]"); + goto end; + } } smf_sel_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "smfSelData"); if (smf_sel_data) { smf_sel_data_local_nonprim = OpenAPI_smf_selection_subscription_data_parseFromJSON(smf_sel_data); + if (!smf_sel_data_local_nonprim) { + ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON failed [smf_sel_data]"); + goto end; + } } uec_amf_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "uecAmfData"); if (uec_amf_data) { uec_amf_data_local_nonprim = OpenAPI_ue_context_in_amf_data_parseFromJSON(uec_amf_data); + if (!uec_amf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_amf_data_parseFromJSON failed [uec_amf_data]"); + goto end; + } } uec_smf_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "uecSmfData"); if (uec_smf_data) { uec_smf_data_local_nonprim = OpenAPI_ue_context_in_smf_data_parseFromJSON(uec_smf_data); + if (!uec_smf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smf_data_parseFromJSON failed [uec_smf_data]"); + goto end; + } } uec_smsf_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "uecSmsfData"); if (uec_smsf_data) { uec_smsf_data_local_nonprim = OpenAPI_ue_context_in_smsf_data_parseFromJSON(uec_smsf_data); + if (!uec_smsf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smsf_data_parseFromJSON failed [uec_smsf_data]"); + goto end; + } } sms_subs_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "smsSubsData"); if (sms_subs_data) { sms_subs_data_local_nonprim = OpenAPI_sms_subscription_data_parseFromJSON(sms_subs_data); + if (!sms_subs_data_local_nonprim) { + ogs_error("OpenAPI_sms_subscription_data_parseFromJSON failed [sms_subs_data]"); + goto end; + } } sm_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "smData"); if (sm_data) { sm_data_local_nonprim = OpenAPI_sm_subs_data_parseFromJSON(sm_data); + if (!sm_data_local_nonprim) { + ogs_error("OpenAPI_sm_subs_data_parseFromJSON failed [sm_data]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } sms_mng_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "smsMngData"); if (sms_mng_data) { sms_mng_data_local_nonprim = OpenAPI_sms_management_subscription_data_parseFromJSON(sms_mng_data); + if (!sms_mng_data_local_nonprim) { + ogs_error("OpenAPI_sms_management_subscription_data_parseFromJSON failed [sms_mng_data]"); + goto end; + } } lcs_privacy_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "lcsPrivacyData"); if (lcs_privacy_data) { lcs_privacy_data_local_nonprim = OpenAPI_lcs_privacy_data_parseFromJSON(lcs_privacy_data); + if (!lcs_privacy_data_local_nonprim) { + ogs_error("OpenAPI_lcs_privacy_data_parseFromJSON failed [lcs_privacy_data]"); + goto end; + } } lcs_mo_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "lcsMoData"); if (lcs_mo_data) { lcs_mo_data_local_nonprim = OpenAPI_lcs_mo_data_parseFromJSON(lcs_mo_data); + if (!lcs_mo_data_local_nonprim) { + ogs_error("OpenAPI_lcs_mo_data_parseFromJSON failed [lcs_mo_data]"); + goto end; + } } v2x_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "v2xData"); if (v2x_data) { v2x_data_local_nonprim = OpenAPI_v2x_subscription_data_parseFromJSON(v2x_data); + if (!v2x_data_local_nonprim) { + ogs_error("OpenAPI_v2x_subscription_data_parseFromJSON failed [v2x_data]"); + goto end; + } } lcs_broadcast_assistance_types_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "lcsBroadcastAssistanceTypesData"); if (lcs_broadcast_assistance_types_data) { lcs_broadcast_assistance_types_data_local_nonprim = OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON(lcs_broadcast_assistance_types_data); + if (!lcs_broadcast_assistance_types_data_local_nonprim) { + ogs_error("OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON failed [lcs_broadcast_assistance_types_data]"); + goto end; + } } prose_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "proseData"); if (prose_data) { prose_data_local_nonprim = OpenAPI_prose_subscription_data_parseFromJSON(prose_data); + if (!prose_data_local_nonprim) { + ogs_error("OpenAPI_prose_subscription_data_parseFromJSON failed [prose_data]"); + goto end; + } } mbs_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "mbsData"); if (mbs_data) { mbs_data_local_nonprim = OpenAPI_mbs_subscription_data_parseFromJSON(mbs_data); + if (!mbs_data_local_nonprim) { + ogs_error("OpenAPI_mbs_subscription_data_parseFromJSON failed [mbs_data]"); + goto end; + } } uc_data = cJSON_GetObjectItemCaseSensitive(immediate_reportJSON, "ucData"); if (uc_data) { uc_data_local_nonprim = OpenAPI_uc_subscription_data_parseFromJSON(uc_data); + if (!uc_data_local_nonprim) { + ogs_error("OpenAPI_uc_subscription_data_parseFromJSON failed [uc_data]"); + goto end; + } } immediate_report_local_var = OpenAPI_immediate_report_create ( diff --git a/lib/sbi/openapi/model/ip_eth_flow_description.c b/lib/sbi/openapi/model/ip_eth_flow_description.c index 1ca1a778a..c779baa3c 100644 --- a/lib/sbi/openapi/model/ip_eth_flow_description.c +++ b/lib/sbi/openapi/model/ip_eth_flow_description.c @@ -89,6 +89,10 @@ OpenAPI_ip_eth_flow_description_t *OpenAPI_ip_eth_flow_description_parseFromJSON eth_traffic_filter = cJSON_GetObjectItemCaseSensitive(ip_eth_flow_descriptionJSON, "ethTrafficFilter"); if (eth_traffic_filter) { eth_traffic_filter_local_nonprim = OpenAPI_eth_flow_description_parseFromJSON(eth_traffic_filter); + if (!eth_traffic_filter_local_nonprim) { + ogs_error("OpenAPI_eth_flow_description_parseFromJSON failed [eth_traffic_filter]"); + goto end; + } } ip_eth_flow_description_local_var = OpenAPI_ip_eth_flow_description_create ( diff --git a/lib/sbi/openapi/model/ip_sm_gw_info.c b/lib/sbi/openapi/model/ip_sm_gw_info.c index 923551ee0..99ec7f5f5 100644 --- a/lib/sbi/openapi/model/ip_sm_gw_info.c +++ b/lib/sbi/openapi/model/ip_sm_gw_info.c @@ -88,11 +88,19 @@ OpenAPI_ip_sm_gw_info_t *OpenAPI_ip_sm_gw_info_parseFromJSON(cJSON *ip_sm_gw_inf ip_sm_gw_registration = cJSON_GetObjectItemCaseSensitive(ip_sm_gw_infoJSON, "ipSmGwRegistration"); if (ip_sm_gw_registration) { ip_sm_gw_registration_local_nonprim = OpenAPI_ip_sm_gw_registration_parseFromJSON(ip_sm_gw_registration); + if (!ip_sm_gw_registration_local_nonprim) { + ogs_error("OpenAPI_ip_sm_gw_registration_parseFromJSON failed [ip_sm_gw_registration]"); + goto end; + } } ip_sm_gw_guidance = cJSON_GetObjectItemCaseSensitive(ip_sm_gw_infoJSON, "ipSmGwGuidance"); if (ip_sm_gw_guidance) { ip_sm_gw_guidance_local_nonprim = OpenAPI_ip_sm_gw_guidance_parseFromJSON(ip_sm_gw_guidance); + if (!ip_sm_gw_guidance_local_nonprim) { + ogs_error("OpenAPI_ip_sm_gw_guidance_parseFromJSON failed [ip_sm_gw_guidance]"); + goto end; + } } ip_sm_gw_info_local_var = OpenAPI_ip_sm_gw_info_create ( diff --git a/lib/sbi/openapi/model/ip_sm_gw_registration.c b/lib/sbi/openapi/model/ip_sm_gw_registration.c index 658b48a66..a5da56e0e 100644 --- a/lib/sbi/openapi/model/ip_sm_gw_registration.c +++ b/lib/sbi/openapi/model/ip_sm_gw_registration.c @@ -194,6 +194,10 @@ OpenAPI_ip_sm_gw_registration_t *OpenAPI_ip_sm_gw_registration_parseFromJSON(cJS ip_sm_gw_diameter_address = cJSON_GetObjectItemCaseSensitive(ip_sm_gw_registrationJSON, "ipSmGwDiameterAddress"); if (ip_sm_gw_diameter_address) { ip_sm_gw_diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_parseFromJSON(ip_sm_gw_diameter_address); + if (!ip_sm_gw_diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_parseFromJSON failed [ip_sm_gw_diameter_address]"); + goto end; + } } ipsmgw_ipv4 = cJSON_GetObjectItemCaseSensitive(ip_sm_gw_registrationJSON, "ipsmgwIpv4"); diff --git a/lib/sbi/openapi/model/iptv_config_data.c b/lib/sbi/openapi/model/iptv_config_data.c index 51eb58a7f..fdb4f0d25 100644 --- a/lib/sbi/openapi/model/iptv_config_data.c +++ b/lib/sbi/openapi/model/iptv_config_data.c @@ -244,6 +244,10 @@ OpenAPI_iptv_config_data_t *OpenAPI_iptv_config_data_parseFromJSON(cJSON *iptv_c snssai = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } af_app_id = cJSON_GetObjectItemCaseSensitive(iptv_config_dataJSON, "afAppId"); diff --git a/lib/sbi/openapi/model/iwmsc_info.c b/lib/sbi/openapi/model/iwmsc_info.c index 1c53cf8a3..4e162f2c8 100644 --- a/lib/sbi/openapi/model/iwmsc_info.c +++ b/lib/sbi/openapi/model/iwmsc_info.c @@ -156,7 +156,6 @@ OpenAPI_iwmsc_info_t *OpenAPI_iwmsc_info_parseFromJSON(cJSON *iwmsc_infoJSON) OpenAPI_identity_range_t *msisdn_rangesItem = OpenAPI_identity_range_parseFromJSON(msisdn_ranges_local); if (!msisdn_rangesItem) { ogs_error("No msisdn_rangesItem"); - OpenAPI_list_free(msisdn_rangesList); goto end; } OpenAPI_list_add(msisdn_rangesList, msisdn_rangesItem); @@ -181,7 +180,6 @@ OpenAPI_iwmsc_info_t *OpenAPI_iwmsc_info_parseFromJSON(cJSON *iwmsc_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -206,7 +204,6 @@ OpenAPI_iwmsc_info_t *OpenAPI_iwmsc_info_parseFromJSON(cJSON *iwmsc_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/lcs_client_external.c b/lib/sbi/openapi/model/lcs_client_external.c index d69300d34..f7eeccf6f 100644 --- a/lib/sbi/openapi/model/lcs_client_external.c +++ b/lib/sbi/openapi/model/lcs_client_external.c @@ -120,7 +120,6 @@ OpenAPI_lcs_client_external_t *OpenAPI_lcs_client_external_parseFromJSON(cJSON * OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local); if (!allowed_geographic_areaItem) { ogs_error("No allowed_geographic_areaItem"); - OpenAPI_list_free(allowed_geographic_areaList); goto end; } OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem); @@ -139,6 +138,10 @@ OpenAPI_lcs_client_external_t *OpenAPI_lcs_client_external_parseFromJSON(cJSON * valid_time_period = cJSON_GetObjectItemCaseSensitive(lcs_client_externalJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } lcs_client_external_local_var = OpenAPI_lcs_client_external_create ( diff --git a/lib/sbi/openapi/model/lcs_client_group_external.c b/lib/sbi/openapi/model/lcs_client_group_external.c index 3b64daf5b..c65eb4c64 100644 --- a/lib/sbi/openapi/model/lcs_client_group_external.c +++ b/lib/sbi/openapi/model/lcs_client_group_external.c @@ -142,7 +142,6 @@ OpenAPI_lcs_client_group_external_t *OpenAPI_lcs_client_group_external_parseFrom OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local); if (!allowed_geographic_areaItem) { ogs_error("No allowed_geographic_areaItem"); - OpenAPI_list_free(allowed_geographic_areaList); goto end; } OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem); @@ -161,6 +160,10 @@ OpenAPI_lcs_client_group_external_t *OpenAPI_lcs_client_group_external_parseFrom valid_time_period = cJSON_GetObjectItemCaseSensitive(lcs_client_group_externalJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } lcs_client_group_external_local_var = OpenAPI_lcs_client_group_external_create ( diff --git a/lib/sbi/openapi/model/lcs_mo_data.c b/lib/sbi/openapi/model/lcs_mo_data.c index 49ff871ba..9aa7bd495 100644 --- a/lib/sbi/openapi/model/lcs_mo_data.c +++ b/lib/sbi/openapi/model/lcs_mo_data.c @@ -112,6 +112,10 @@ OpenAPI_lcs_mo_data_t *OpenAPI_lcs_mo_data_parseFromJSON(cJSON *lcs_mo_dataJSON) mo_assistance_data_types = cJSON_GetObjectItemCaseSensitive(lcs_mo_dataJSON, "moAssistanceDataTypes"); if (mo_assistance_data_types) { mo_assistance_data_types_local_nonprim = OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON(mo_assistance_data_types); + if (!mo_assistance_data_types_local_nonprim) { + ogs_error("OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON failed [mo_assistance_data_types]"); + goto end; + } } lcs_mo_data_local_var = OpenAPI_lcs_mo_data_create ( diff --git a/lib/sbi/openapi/model/lcs_privacy.c b/lib/sbi/openapi/model/lcs_privacy.c index beac5c4c6..81500acff 100644 --- a/lib/sbi/openapi/model/lcs_privacy.c +++ b/lib/sbi/openapi/model/lcs_privacy.c @@ -123,6 +123,10 @@ OpenAPI_lcs_privacy_t *OpenAPI_lcs_privacy_parseFromJSON(cJSON *lcs_privacyJSON) lpi = cJSON_GetObjectItemCaseSensitive(lcs_privacyJSON, "lpi"); if (lpi) { lpi_local_nonprim = OpenAPI_lpi_parseFromJSON(lpi); + if (!lpi_local_nonprim) { + ogs_error("OpenAPI_lpi_parseFromJSON failed [lpi]"); + goto end; + } } mtc_provider_information = cJSON_GetObjectItemCaseSensitive(lcs_privacyJSON, "mtcProviderInformation"); diff --git a/lib/sbi/openapi/model/lcs_privacy_data.c b/lib/sbi/openapi/model/lcs_privacy_data.c index 474710c47..e07b7e12c 100644 --- a/lib/sbi/openapi/model/lcs_privacy_data.c +++ b/lib/sbi/openapi/model/lcs_privacy_data.c @@ -115,11 +115,19 @@ OpenAPI_lcs_privacy_data_t *OpenAPI_lcs_privacy_data_parseFromJSON(cJSON *lcs_pr lpi = cJSON_GetObjectItemCaseSensitive(lcs_privacy_dataJSON, "lpi"); if (lpi) { lpi_local_nonprim = OpenAPI_lpi_parseFromJSON(lpi); + if (!lpi_local_nonprim) { + ogs_error("OpenAPI_lpi_parseFromJSON failed [lpi]"); + goto end; + } } unrelated_class = cJSON_GetObjectItemCaseSensitive(lcs_privacy_dataJSON, "unrelatedClass"); if (unrelated_class) { unrelated_class_local_nonprim = OpenAPI_unrelated_class_parseFromJSON(unrelated_class); + if (!unrelated_class_local_nonprim) { + ogs_error("OpenAPI_unrelated_class_parseFromJSON failed [unrelated_class]"); + goto end; + } } plmn_operator_classes = cJSON_GetObjectItemCaseSensitive(lcs_privacy_dataJSON, "plmnOperatorClasses"); @@ -140,7 +148,6 @@ OpenAPI_lcs_privacy_data_t *OpenAPI_lcs_privacy_data_parseFromJSON(cJSON *lcs_pr OpenAPI_plmn_operator_class_t *plmn_operator_classesItem = OpenAPI_plmn_operator_class_parseFromJSON(plmn_operator_classes_local); if (!plmn_operator_classesItem) { ogs_error("No plmn_operator_classesItem"); - OpenAPI_list_free(plmn_operator_classesList); goto end; } OpenAPI_list_add(plmn_operator_classesList, plmn_operator_classesItem); diff --git a/lib/sbi/openapi/model/lmf_info.c b/lib/sbi/openapi/model/lmf_info.c index f0b76ff4b..cd1504eb9 100644 --- a/lib/sbi/openapi/model/lmf_info.c +++ b/lib/sbi/openapi/model/lmf_info.c @@ -249,7 +249,6 @@ OpenAPI_lmf_info_t *OpenAPI_lmf_info_parseFromJSON(cJSON *lmf_infoJSON) OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local); if (!serving_client_typesItem) { ogs_error("No serving_client_typesItem"); - OpenAPI_list_free(serving_client_typesList); goto end; } OpenAPI_list_add(serving_client_typesList, serving_client_typesItem); @@ -339,7 +338,6 @@ OpenAPI_lmf_info_t *OpenAPI_lmf_info_parseFromJSON(cJSON *lmf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -364,7 +362,6 @@ OpenAPI_lmf_info_t *OpenAPI_lmf_info_parseFromJSON(cJSON *lmf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -389,7 +386,6 @@ OpenAPI_lmf_info_t *OpenAPI_lmf_info_parseFromJSON(cJSON *lmf_infoJSON) OpenAPI_supported_gad_shapes_t *supported_gad_shapesItem = OpenAPI_supported_gad_shapes_parseFromJSON(supported_gad_shapes_local); if (!supported_gad_shapesItem) { ogs_error("No supported_gad_shapesItem"); - OpenAPI_list_free(supported_gad_shapesList); goto end; } OpenAPI_list_add(supported_gad_shapesList, supported_gad_shapesItem); diff --git a/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse.c b/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse.c index 5dad075fd..972403a55 100644 --- a/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse.c +++ b/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse.c @@ -149,6 +149,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_t *OpenAPI_local2d_point_uncertainty_e goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } local_origin = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipseJSON, "localOrigin"); if (!local_origin) { @@ -156,6 +160,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_t *OpenAPI_local2d_point_uncertainty_e goto end; } local_origin_local_nonprim = OpenAPI_local_origin_parseFromJSON(local_origin); + if (!local_origin_local_nonprim) { + ogs_error("OpenAPI_local_origin_parseFromJSON failed [local_origin]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipseJSON, "point"); if (!point) { @@ -163,6 +171,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_t *OpenAPI_local2d_point_uncertainty_e goto end; } point_local_nonprim = OpenAPI_relative_cartesian_location_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_relative_cartesian_location_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipseJSON, "uncertaintyEllipse"); if (!uncertainty_ellipse) { @@ -170,6 +182,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_t *OpenAPI_local2d_point_uncertainty_e goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipseJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse_all_of.c b/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse_all_of.c index 1f7db4e8f..0c1d21aa8 100644 --- a/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse_all_of.c +++ b/lib/sbi/openapi/model/local2d_point_uncertainty_ellipse_all_of.c @@ -126,6 +126,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_all_of_t *OpenAPI_local2d_point_uncert goto end; } local_origin_local_nonprim = OpenAPI_local_origin_parseFromJSON(local_origin); + if (!local_origin_local_nonprim) { + ogs_error("OpenAPI_local_origin_parseFromJSON failed [local_origin]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipse_all_ofJSON, "point"); if (!point) { @@ -133,6 +137,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_all_of_t *OpenAPI_local2d_point_uncert goto end; } point_local_nonprim = OpenAPI_relative_cartesian_location_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_relative_cartesian_location_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipse_all_ofJSON, "uncertaintyEllipse"); if (!uncertainty_ellipse) { @@ -140,6 +148,10 @@ OpenAPI_local2d_point_uncertainty_ellipse_all_of_t *OpenAPI_local2d_point_uncert goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(local2d_point_uncertainty_ellipse_all_ofJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid.c b/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid.c index 85feec5da..2b21d8ef3 100644 --- a/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid.c +++ b/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid.c @@ -149,6 +149,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_t *OpenAPI_local3d_point_uncertainty goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } local_origin = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoidJSON, "localOrigin"); if (!local_origin) { @@ -156,6 +160,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_t *OpenAPI_local3d_point_uncertainty goto end; } local_origin_local_nonprim = OpenAPI_local_origin_parseFromJSON(local_origin); + if (!local_origin_local_nonprim) { + ogs_error("OpenAPI_local_origin_parseFromJSON failed [local_origin]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoidJSON, "point"); if (!point) { @@ -163,6 +171,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_t *OpenAPI_local3d_point_uncertainty goto end; } point_local_nonprim = OpenAPI_relative_cartesian_location_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_relative_cartesian_location_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipsoid = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoidJSON, "uncertaintyEllipsoid"); if (!uncertainty_ellipsoid) { @@ -170,6 +182,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_t *OpenAPI_local3d_point_uncertainty goto end; } uncertainty_ellipsoid_local_nonprim = OpenAPI_uncertainty_ellipsoid_parseFromJSON(uncertainty_ellipsoid); + if (!uncertainty_ellipsoid_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipsoid_parseFromJSON failed [uncertainty_ellipsoid]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoidJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid_all_of.c b/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid_all_of.c index 48d19e31e..776eb2531 100644 --- a/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid_all_of.c +++ b/lib/sbi/openapi/model/local3d_point_uncertainty_ellipsoid_all_of.c @@ -126,6 +126,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_all_of_t *OpenAPI_local3d_point_unce goto end; } local_origin_local_nonprim = OpenAPI_local_origin_parseFromJSON(local_origin); + if (!local_origin_local_nonprim) { + ogs_error("OpenAPI_local_origin_parseFromJSON failed [local_origin]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoid_all_ofJSON, "point"); if (!point) { @@ -133,6 +137,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_all_of_t *OpenAPI_local3d_point_unce goto end; } point_local_nonprim = OpenAPI_relative_cartesian_location_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_relative_cartesian_location_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipsoid = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoid_all_ofJSON, "uncertaintyEllipsoid"); if (!uncertainty_ellipsoid) { @@ -140,6 +148,10 @@ OpenAPI_local3d_point_uncertainty_ellipsoid_all_of_t *OpenAPI_local3d_point_unce goto end; } uncertainty_ellipsoid_local_nonprim = OpenAPI_uncertainty_ellipsoid_parseFromJSON(uncertainty_ellipsoid); + if (!uncertainty_ellipsoid_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipsoid_parseFromJSON failed [uncertainty_ellipsoid]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(local3d_point_uncertainty_ellipsoid_all_ofJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/local_origin.c b/lib/sbi/openapi/model/local_origin.c index be7f7b007..f94d89bdc 100644 --- a/lib/sbi/openapi/model/local_origin.c +++ b/lib/sbi/openapi/model/local_origin.c @@ -89,6 +89,10 @@ OpenAPI_local_origin_t *OpenAPI_local_origin_parseFromJSON(cJSON *local_originJS point = cJSON_GetObjectItemCaseSensitive(local_originJSON, "point"); if (point) { point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } } local_origin_local_var = OpenAPI_local_origin_create ( diff --git a/lib/sbi/openapi/model/location_area.c b/lib/sbi/openapi/model/location_area.c index dbbb89e64..2b5b3420e 100644 --- a/lib/sbi/openapi/model/location_area.c +++ b/lib/sbi/openapi/model/location_area.c @@ -157,7 +157,6 @@ OpenAPI_location_area_t *OpenAPI_location_area_parseFromJSON(cJSON *location_are OpenAPI_geographic_area_t *geographic_areasItem = OpenAPI_geographic_area_parseFromJSON(geographic_areas_local); if (!geographic_areasItem) { ogs_error("No geographic_areasItem"); - OpenAPI_list_free(geographic_areasList); goto end; } OpenAPI_list_add(geographic_areasList, geographic_areasItem); @@ -182,7 +181,6 @@ OpenAPI_location_area_t *OpenAPI_location_area_parseFromJSON(cJSON *location_are OpenAPI_civic_address_t *civic_addressesItem = OpenAPI_civic_address_parseFromJSON(civic_addresses_local); if (!civic_addressesItem) { ogs_error("No civic_addressesItem"); - OpenAPI_list_free(civic_addressesList); goto end; } OpenAPI_list_add(civic_addressesList, civic_addressesItem); @@ -192,11 +190,19 @@ OpenAPI_location_area_t *OpenAPI_location_area_parseFromJSON(cJSON *location_are nw_area_info = cJSON_GetObjectItemCaseSensitive(location_areaJSON, "nwAreaInfo"); if (nw_area_info) { nw_area_info_local_nonprim = OpenAPI_network_area_info_1_parseFromJSON(nw_area_info); + if (!nw_area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_1_parseFromJSON failed [nw_area_info]"); + goto end; + } } umt_time = cJSON_GetObjectItemCaseSensitive(location_areaJSON, "umtTime"); if (umt_time) { umt_time_local_nonprim = OpenAPI_umt_time_parseFromJSON(umt_time); + if (!umt_time_local_nonprim) { + ogs_error("OpenAPI_umt_time_parseFromJSON failed [umt_time]"); + goto end; + } } location_area_local_var = OpenAPI_location_area_create ( diff --git a/lib/sbi/openapi/model/location_area_1.c b/lib/sbi/openapi/model/location_area_1.c index 988fb025d..32cf67eec 100644 --- a/lib/sbi/openapi/model/location_area_1.c +++ b/lib/sbi/openapi/model/location_area_1.c @@ -157,7 +157,6 @@ OpenAPI_location_area_1_t *OpenAPI_location_area_1_parseFromJSON(cJSON *location OpenAPI_geographic_area_t *geographic_areasItem = OpenAPI_geographic_area_parseFromJSON(geographic_areas_local); if (!geographic_areasItem) { ogs_error("No geographic_areasItem"); - OpenAPI_list_free(geographic_areasList); goto end; } OpenAPI_list_add(geographic_areasList, geographic_areasItem); @@ -182,7 +181,6 @@ OpenAPI_location_area_1_t *OpenAPI_location_area_1_parseFromJSON(cJSON *location OpenAPI_civic_address_t *civic_addressesItem = OpenAPI_civic_address_parseFromJSON(civic_addresses_local); if (!civic_addressesItem) { ogs_error("No civic_addressesItem"); - OpenAPI_list_free(civic_addressesList); goto end; } OpenAPI_list_add(civic_addressesList, civic_addressesItem); @@ -192,11 +190,19 @@ OpenAPI_location_area_1_t *OpenAPI_location_area_1_parseFromJSON(cJSON *location nw_area_info = cJSON_GetObjectItemCaseSensitive(location_area_1JSON, "nwAreaInfo"); if (nw_area_info) { nw_area_info_local_nonprim = OpenAPI_network_area_info_1_parseFromJSON(nw_area_info); + if (!nw_area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_1_parseFromJSON failed [nw_area_info]"); + goto end; + } } umt_time = cJSON_GetObjectItemCaseSensitive(location_area_1JSON, "umtTime"); if (umt_time) { umt_time_local_nonprim = OpenAPI_umt_time_1_parseFromJSON(umt_time); + if (!umt_time_local_nonprim) { + ogs_error("OpenAPI_umt_time_1_parseFromJSON failed [umt_time]"); + goto end; + } } location_area_1_local_var = OpenAPI_location_area_1_create ( diff --git a/lib/sbi/openapi/model/location_area_id.c b/lib/sbi/openapi/model/location_area_id.c index 9bebbcc6e..708c18a3f 100644 --- a/lib/sbi/openapi/model/location_area_id.c +++ b/lib/sbi/openapi/model/location_area_id.c @@ -88,6 +88,10 @@ OpenAPI_location_area_id_t *OpenAPI_location_area_id_parseFromJSON(cJSON *locati goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } lac = cJSON_GetObjectItemCaseSensitive(location_area_idJSON, "lac"); if (!lac) { diff --git a/lib/sbi/openapi/model/location_info.c b/lib/sbi/openapi/model/location_info.c index 97422c582..434c70182 100644 --- a/lib/sbi/openapi/model/location_info.c +++ b/lib/sbi/openapi/model/location_info.c @@ -96,6 +96,10 @@ OpenAPI_location_info_t *OpenAPI_location_info_parseFromJSON(cJSON *location_inf goto end; } loc_local_nonprim = OpenAPI_user_location_parseFromJSON(loc); + if (!loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [loc]"); + goto end; + } ratio = cJSON_GetObjectItemCaseSensitive(location_infoJSON, "ratio"); if (ratio) { diff --git a/lib/sbi/openapi/model/location_reporting_configuration.c b/lib/sbi/openapi/model/location_reporting_configuration.c index a969e24c8..fd936cdf1 100644 --- a/lib/sbi/openapi/model/location_reporting_configuration.c +++ b/lib/sbi/openapi/model/location_reporting_configuration.c @@ -126,11 +126,19 @@ OpenAPI_location_reporting_configuration_t *OpenAPI_location_reporting_configura accuracy = cJSON_GetObjectItemCaseSensitive(location_reporting_configurationJSON, "accuracy"); if (accuracy) { accuracy_local_nonprim = OpenAPI_location_accuracy_parseFromJSON(accuracy); + if (!accuracy_local_nonprim) { + ogs_error("OpenAPI_location_accuracy_parseFromJSON failed [accuracy]"); + goto end; + } } n3gpp_accuracy = cJSON_GetObjectItemCaseSensitive(location_reporting_configurationJSON, "n3gppAccuracy"); if (n3gpp_accuracy) { n3gpp_accuracy_local_nonprim = OpenAPI_location_accuracy_parseFromJSON(n3gpp_accuracy); + if (!n3gpp_accuracy_local_nonprim) { + ogs_error("OpenAPI_location_accuracy_parseFromJSON failed [n3gpp_accuracy]"); + goto end; + } } location_reporting_configuration_local_var = OpenAPI_location_reporting_configuration_create ( diff --git a/lib/sbi/openapi/model/location_reporting_configuration_1.c b/lib/sbi/openapi/model/location_reporting_configuration_1.c index 1dd984d65..f31de258e 100644 --- a/lib/sbi/openapi/model/location_reporting_configuration_1.c +++ b/lib/sbi/openapi/model/location_reporting_configuration_1.c @@ -126,11 +126,19 @@ OpenAPI_location_reporting_configuration_1_t *OpenAPI_location_reporting_configu accuracy = cJSON_GetObjectItemCaseSensitive(location_reporting_configuration_1JSON, "accuracy"); if (accuracy) { accuracy_local_nonprim = OpenAPI_location_accuracy_parseFromJSON(accuracy); + if (!accuracy_local_nonprim) { + ogs_error("OpenAPI_location_accuracy_parseFromJSON failed [accuracy]"); + goto end; + } } n3gpp_accuracy = cJSON_GetObjectItemCaseSensitive(location_reporting_configuration_1JSON, "n3gppAccuracy"); if (n3gpp_accuracy) { n3gpp_accuracy_local_nonprim = OpenAPI_location_accuracy_parseFromJSON(n3gpp_accuracy); + if (!n3gpp_accuracy_local_nonprim) { + ogs_error("OpenAPI_location_accuracy_parseFromJSON failed [n3gpp_accuracy]"); + goto end; + } } location_reporting_configuration_1_local_var = OpenAPI_location_reporting_configuration_1_create ( diff --git a/lib/sbi/openapi/model/lpi.c b/lib/sbi/openapi/model/lpi.c index d9b66d673..81bf975b9 100644 --- a/lib/sbi/openapi/model/lpi.c +++ b/lib/sbi/openapi/model/lpi.c @@ -91,6 +91,10 @@ OpenAPI_lpi_t *OpenAPI_lpi_parseFromJSON(cJSON *lpiJSON) valid_time_period = cJSON_GetObjectItemCaseSensitive(lpiJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } lpi_local_var = OpenAPI_lpi_create ( diff --git a/lib/sbi/openapi/model/mapping_of_snssai.c b/lib/sbi/openapi/model/mapping_of_snssai.c index a34cca526..bd1bd4365 100644 --- a/lib/sbi/openapi/model/mapping_of_snssai.c +++ b/lib/sbi/openapi/model/mapping_of_snssai.c @@ -95,6 +95,10 @@ OpenAPI_mapping_of_snssai_t *OpenAPI_mapping_of_snssai_parseFromJSON(cJSON *mapp goto end; } serving_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(serving_snssai); + if (!serving_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [serving_snssai]"); + goto end; + } home_snssai = cJSON_GetObjectItemCaseSensitive(mapping_of_snssaiJSON, "homeSnssai"); if (!home_snssai) { @@ -102,6 +106,10 @@ OpenAPI_mapping_of_snssai_t *OpenAPI_mapping_of_snssai_parseFromJSON(cJSON *mapp goto end; } home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(home_snssai); + if (!home_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [home_snssai]"); + goto end; + } mapping_of_snssai_local_var = OpenAPI_mapping_of_snssai_create ( serving_snssai_local_nonprim, diff --git a/lib/sbi/openapi/model/mb_smf_info.c b/lib/sbi/openapi/model/mb_smf_info.c index 63a0fb95b..b113823f9 100644 --- a/lib/sbi/openapi/model/mb_smf_info.c +++ b/lib/sbi/openapi/model/mb_smf_info.c @@ -275,7 +275,6 @@ OpenAPI_mb_smf_info_t *OpenAPI_mb_smf_info_parseFromJSON(cJSON *mb_smf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -300,7 +299,6 @@ OpenAPI_mb_smf_info_t *OpenAPI_mb_smf_info_parseFromJSON(cJSON *mb_smf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/mb_upf_info.c b/lib/sbi/openapi/model/mb_upf_info.c index 60fb27835..a97343606 100644 --- a/lib/sbi/openapi/model/mb_upf_info.c +++ b/lib/sbi/openapi/model/mb_upf_info.c @@ -225,7 +225,6 @@ OpenAPI_mb_upf_info_t *OpenAPI_mb_upf_info_parseFromJSON(cJSON *mb_upf_infoJSON) OpenAPI_snssai_upf_info_item_t *s_nssai_mb_upf_info_listItem = OpenAPI_snssai_upf_info_item_parseFromJSON(s_nssai_mb_upf_info_list_local); if (!s_nssai_mb_upf_info_listItem) { ogs_error("No s_nssai_mb_upf_info_listItem"); - OpenAPI_list_free(s_nssai_mb_upf_info_listList); goto end; } OpenAPI_list_add(s_nssai_mb_upf_info_listList, s_nssai_mb_upf_info_listItem); @@ -270,7 +269,6 @@ OpenAPI_mb_upf_info_t *OpenAPI_mb_upf_info_parseFromJSON(cJSON *mb_upf_infoJSON) OpenAPI_interface_upf_info_item_t *interface_mb_upf_info_listItem = OpenAPI_interface_upf_info_item_parseFromJSON(interface_mb_upf_info_list_local); if (!interface_mb_upf_info_listItem) { ogs_error("No interface_mb_upf_info_listItem"); - OpenAPI_list_free(interface_mb_upf_info_listList); goto end; } OpenAPI_list_add(interface_mb_upf_info_listList, interface_mb_upf_info_listItem); @@ -295,7 +293,6 @@ OpenAPI_mb_upf_info_t *OpenAPI_mb_upf_info_parseFromJSON(cJSON *mb_upf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -320,7 +317,6 @@ OpenAPI_mb_upf_info_t *OpenAPI_mb_upf_info_parseFromJSON(cJSON *mb_upf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/mbs_binding_resp.c b/lib/sbi/openapi/model/mbs_binding_resp.c index 8e753aa42..2bd677964 100644 --- a/lib/sbi/openapi/model/mbs_binding_resp.c +++ b/lib/sbi/openapi/model/mbs_binding_resp.c @@ -110,7 +110,6 @@ OpenAPI_mbs_binding_resp_t *OpenAPI_mbs_binding_resp_parseFromJSON(cJSON *mbs_bi OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/mbs_ext_problem_details.c b/lib/sbi/openapi/model/mbs_ext_problem_details.c index 113114d66..407862866 100644 --- a/lib/sbi/openapi/model/mbs_ext_problem_details.c +++ b/lib/sbi/openapi/model/mbs_ext_problem_details.c @@ -329,7 +329,6 @@ OpenAPI_mbs_ext_problem_details_t *OpenAPI_mbs_ext_problem_details_parseFromJSON OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -347,11 +346,19 @@ OpenAPI_mbs_ext_problem_details_t *OpenAPI_mbs_ext_problem_details_parseFromJSON access_token_error = cJSON_GetObjectItemCaseSensitive(mbs_ext_problem_detailsJSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(mbs_ext_problem_detailsJSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(mbs_ext_problem_detailsJSON, "nrfId"); @@ -388,7 +395,6 @@ OpenAPI_mbs_ext_problem_details_t *OpenAPI_mbs_ext_problem_details_parseFromJSON OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/mbs_service_area.c b/lib/sbi/openapi/model/mbs_service_area.c index f3afabcd1..6820ace73 100644 --- a/lib/sbi/openapi/model/mbs_service_area.c +++ b/lib/sbi/openapi/model/mbs_service_area.c @@ -115,7 +115,6 @@ OpenAPI_mbs_service_area_t *OpenAPI_mbs_service_area_parseFromJSON(cJSON *mbs_se OpenAPI_ncgi_tai_t *ncgi_listItem = OpenAPI_ncgi_tai_parseFromJSON(ncgi_list_local); if (!ncgi_listItem) { ogs_error("No ncgi_listItem"); - OpenAPI_list_free(ncgi_listList); goto end; } OpenAPI_list_add(ncgi_listList, ncgi_listItem); @@ -140,7 +139,6 @@ OpenAPI_mbs_service_area_t *OpenAPI_mbs_service_area_parseFromJSON(cJSON *mbs_se OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); diff --git a/lib/sbi/openapi/model/mbs_service_area_info.c b/lib/sbi/openapi/model/mbs_service_area_info.c index a9ec36412..1e94cb914 100644 --- a/lib/sbi/openapi/model/mbs_service_area_info.c +++ b/lib/sbi/openapi/model/mbs_service_area_info.c @@ -90,6 +90,10 @@ OpenAPI_mbs_service_area_info_t *OpenAPI_mbs_service_area_info_parseFromJSON(cJS goto end; } mbs_service_area_local_nonprim = OpenAPI_mbs_service_area_parseFromJSON(mbs_service_area); + if (!mbs_service_area_local_nonprim) { + ogs_error("OpenAPI_mbs_service_area_parseFromJSON failed [mbs_service_area]"); + goto end; + } mbs_service_area_info_local_var = OpenAPI_mbs_service_area_info_create ( diff --git a/lib/sbi/openapi/model/mbs_session.c b/lib/sbi/openapi/model/mbs_session.c index bcf412207..edf4b6fc3 100644 --- a/lib/sbi/openapi/model/mbs_session.c +++ b/lib/sbi/openapi/model/mbs_session.c @@ -108,6 +108,10 @@ OpenAPI_mbs_session_t *OpenAPI_mbs_session_parseFromJSON(cJSON *mbs_sessionJSON) goto end; } mbs_session_id_local_nonprim = OpenAPI_mbs_session_id_parseFromJSON(mbs_session_id); + if (!mbs_session_id_local_nonprim) { + ogs_error("OpenAPI_mbs_session_id_parseFromJSON failed [mbs_session_id]"); + goto end; + } mbs_area_sessions = cJSON_GetObjectItemCaseSensitive(mbs_sessionJSON, "mbsAreaSessions"); if (mbs_area_sessions) { diff --git a/lib/sbi/openapi/model/mbs_session_id.c b/lib/sbi/openapi/model/mbs_session_id.c index 27e6e14b2..e240a4297 100644 --- a/lib/sbi/openapi/model/mbs_session_id.c +++ b/lib/sbi/openapi/model/mbs_session_id.c @@ -102,11 +102,19 @@ OpenAPI_mbs_session_id_t *OpenAPI_mbs_session_id_parseFromJSON(cJSON *mbs_sessio tmgi = cJSON_GetObjectItemCaseSensitive(mbs_session_idJSON, "tmgi"); if (tmgi) { tmgi_local_nonprim = OpenAPI_tmgi_parseFromJSON(tmgi); + if (!tmgi_local_nonprim) { + ogs_error("OpenAPI_tmgi_parseFromJSON failed [tmgi]"); + goto end; + } } ssm = cJSON_GetObjectItemCaseSensitive(mbs_session_idJSON, "ssm"); if (ssm) { ssm_local_nonprim = OpenAPI_ssm_parseFromJSON(ssm); + if (!ssm_local_nonprim) { + ogs_error("OpenAPI_ssm_parseFromJSON failed [ssm]"); + goto end; + } } nid = cJSON_GetObjectItemCaseSensitive(mbs_session_idJSON, "nid"); diff --git a/lib/sbi/openapi/model/mbs_session_id_1.c b/lib/sbi/openapi/model/mbs_session_id_1.c index 7f5c961df..be877891d 100644 --- a/lib/sbi/openapi/model/mbs_session_id_1.c +++ b/lib/sbi/openapi/model/mbs_session_id_1.c @@ -102,11 +102,19 @@ OpenAPI_mbs_session_id_1_t *OpenAPI_mbs_session_id_1_parseFromJSON(cJSON *mbs_se tmgi = cJSON_GetObjectItemCaseSensitive(mbs_session_id_1JSON, "tmgi"); if (tmgi) { tmgi_local_nonprim = OpenAPI_tmgi_1_parseFromJSON(tmgi); + if (!tmgi_local_nonprim) { + ogs_error("OpenAPI_tmgi_1_parseFromJSON failed [tmgi]"); + goto end; + } } ssm = cJSON_GetObjectItemCaseSensitive(mbs_session_id_1JSON, "ssm"); if (ssm) { ssm_local_nonprim = OpenAPI_ssm_1_parseFromJSON(ssm); + if (!ssm_local_nonprim) { + ogs_error("OpenAPI_ssm_1_parseFromJSON failed [ssm]"); + goto end; + } } nid = cJSON_GetObjectItemCaseSensitive(mbs_session_id_1JSON, "nid"); diff --git a/lib/sbi/openapi/model/mbs_subscription_data.c b/lib/sbi/openapi/model/mbs_subscription_data.c index 2894b8b92..ce6ae6804 100644 --- a/lib/sbi/openapi/model/mbs_subscription_data.c +++ b/lib/sbi/openapi/model/mbs_subscription_data.c @@ -108,7 +108,6 @@ OpenAPI_mbs_subscription_data_t *OpenAPI_mbs_subscription_data_parseFromJSON(cJS OpenAPI_mbs_session_id_t *mbs_session_id_listItem = OpenAPI_mbs_session_id_parseFromJSON(mbs_session_id_list_local); if (!mbs_session_id_listItem) { ogs_error("No mbs_session_id_listItem"); - OpenAPI_list_free(mbs_session_id_listList); goto end; } OpenAPI_list_add(mbs_session_id_listList, mbs_session_id_listItem); diff --git a/lib/sbi/openapi/model/mbs_subscription_data_1.c b/lib/sbi/openapi/model/mbs_subscription_data_1.c index cc11e7c23..95fcc2791 100644 --- a/lib/sbi/openapi/model/mbs_subscription_data_1.c +++ b/lib/sbi/openapi/model/mbs_subscription_data_1.c @@ -108,7 +108,6 @@ OpenAPI_mbs_subscription_data_1_t *OpenAPI_mbs_subscription_data_1_parseFromJSON OpenAPI_mbs_session_id_1_t *mbs_session_id_listItem = OpenAPI_mbs_session_id_1_parseFromJSON(mbs_session_id_list_local); if (!mbs_session_id_listItem) { ogs_error("No mbs_session_id_listItem"); - OpenAPI_list_free(mbs_session_id_listList); goto end; } OpenAPI_list_add(mbs_session_id_listList, mbs_session_id_listItem); diff --git a/lib/sbi/openapi/model/mdt_configuration.c b/lib/sbi/openapi/model/mdt_configuration.c index 41eb35c0a..550bffa05 100644 --- a/lib/sbi/openapi/model/mdt_configuration.c +++ b/lib/sbi/openapi/model/mdt_configuration.c @@ -493,6 +493,10 @@ OpenAPI_mdt_configuration_t *OpenAPI_mdt_configuration_parseFromJSON(cJSON *mdt_ area_scope = cJSON_GetObjectItemCaseSensitive(mdt_configurationJSON, "areaScope"); if (area_scope) { area_scope_local_nonprim = OpenAPI_area_scope_parseFromJSON(area_scope); + if (!area_scope_local_nonprim) { + ogs_error("OpenAPI_area_scope_parseFromJSON failed [area_scope]"); + goto end; + } } measurement_lte_list = cJSON_GetObjectItemCaseSensitive(mdt_configurationJSON, "measurementLteList"); @@ -758,7 +762,6 @@ OpenAPI_mdt_configuration_t *OpenAPI_mdt_configuration_parseFromJSON(cJSON *mdt_ OpenAPI_plmn_id_t *mdt_allowed_plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(mdt_allowed_plmn_id_list_local); if (!mdt_allowed_plmn_id_listItem) { ogs_error("No mdt_allowed_plmn_id_listItem"); - OpenAPI_list_free(mdt_allowed_plmn_id_listList); goto end; } OpenAPI_list_add(mdt_allowed_plmn_id_listList, mdt_allowed_plmn_id_listItem); @@ -783,7 +786,6 @@ OpenAPI_mdt_configuration_t *OpenAPI_mdt_configuration_parseFromJSON(cJSON *mdt_ OpenAPI_mbsfn_area_t *mbsfn_area_listItem = OpenAPI_mbsfn_area_parseFromJSON(mbsfn_area_list_local); if (!mbsfn_area_listItem) { ogs_error("No mbsfn_area_listItem"); - OpenAPI_list_free(mbsfn_area_listList); goto end; } OpenAPI_list_add(mbsfn_area_listList, mbsfn_area_listItem); @@ -808,7 +810,6 @@ OpenAPI_mdt_configuration_t *OpenAPI_mdt_configuration_parseFromJSON(cJSON *mdt_ OpenAPI_inter_freq_target_info_t *inter_freq_target_listItem = OpenAPI_inter_freq_target_info_parseFromJSON(inter_freq_target_list_local); if (!inter_freq_target_listItem) { ogs_error("No inter_freq_target_listItem"); - OpenAPI_list_free(inter_freq_target_listList); goto end; } OpenAPI_list_add(inter_freq_target_listList, inter_freq_target_listItem); diff --git a/lib/sbi/openapi/model/mdt_configuration_1.c b/lib/sbi/openapi/model/mdt_configuration_1.c index 736c89a4c..29258fee8 100644 --- a/lib/sbi/openapi/model/mdt_configuration_1.c +++ b/lib/sbi/openapi/model/mdt_configuration_1.c @@ -493,6 +493,10 @@ OpenAPI_mdt_configuration_1_t *OpenAPI_mdt_configuration_1_parseFromJSON(cJSON * area_scope = cJSON_GetObjectItemCaseSensitive(mdt_configuration_1JSON, "areaScope"); if (area_scope) { area_scope_local_nonprim = OpenAPI_area_scope_parseFromJSON(area_scope); + if (!area_scope_local_nonprim) { + ogs_error("OpenAPI_area_scope_parseFromJSON failed [area_scope]"); + goto end; + } } measurement_lte_list = cJSON_GetObjectItemCaseSensitive(mdt_configuration_1JSON, "measurementLteList"); @@ -758,7 +762,6 @@ OpenAPI_mdt_configuration_1_t *OpenAPI_mdt_configuration_1_parseFromJSON(cJSON * OpenAPI_plmn_id_1_t *mdt_allowed_plmn_id_listItem = OpenAPI_plmn_id_1_parseFromJSON(mdt_allowed_plmn_id_list_local); if (!mdt_allowed_plmn_id_listItem) { ogs_error("No mdt_allowed_plmn_id_listItem"); - OpenAPI_list_free(mdt_allowed_plmn_id_listList); goto end; } OpenAPI_list_add(mdt_allowed_plmn_id_listList, mdt_allowed_plmn_id_listItem); @@ -783,7 +786,6 @@ OpenAPI_mdt_configuration_1_t *OpenAPI_mdt_configuration_1_parseFromJSON(cJSON * OpenAPI_mbsfn_area_t *mbsfn_area_listItem = OpenAPI_mbsfn_area_parseFromJSON(mbsfn_area_list_local); if (!mbsfn_area_listItem) { ogs_error("No mbsfn_area_listItem"); - OpenAPI_list_free(mbsfn_area_listList); goto end; } OpenAPI_list_add(mbsfn_area_listList, mbsfn_area_listItem); @@ -808,7 +810,6 @@ OpenAPI_mdt_configuration_1_t *OpenAPI_mdt_configuration_1_parseFromJSON(cJSON * OpenAPI_inter_freq_target_info_1_t *inter_freq_target_listItem = OpenAPI_inter_freq_target_info_1_parseFromJSON(inter_freq_target_list_local); if (!inter_freq_target_listItem) { ogs_error("No inter_freq_target_listItem"); - OpenAPI_list_free(inter_freq_target_listList); goto end; } OpenAPI_list_add(inter_freq_target_listList, inter_freq_target_listItem); diff --git a/lib/sbi/openapi/model/media_component.c b/lib/sbi/openapi/model/media_component.c index 4d9dd8238..51175164c 100644 --- a/lib/sbi/openapi/model/media_component.c +++ b/lib/sbi/openapi/model/media_component.c @@ -615,6 +615,10 @@ OpenAPI_media_component_t *OpenAPI_media_component_parseFromJSON(cJSON *media_co af_rout_req = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "afRoutReq"); if (af_rout_req) { af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_parseFromJSON(af_rout_req); + if (!af_rout_req_local_nonprim) { + ogs_error("OpenAPI_af_routing_requirement_parseFromJSON failed [af_rout_req]"); + goto end; + } } qos_reference = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "qosReference"); @@ -672,7 +676,6 @@ OpenAPI_media_component_t *OpenAPI_media_component_parseFromJSON(cJSON *media_co OpenAPI_alternative_service_requirements_data_t *alt_ser_reqs_dataItem = OpenAPI_alternative_service_requirements_data_parseFromJSON(alt_ser_reqs_data_local); if (!alt_ser_reqs_dataItem) { ogs_error("No alt_ser_reqs_dataItem"); - OpenAPI_list_free(alt_ser_reqs_dataList); goto end; } OpenAPI_list_add(alt_ser_reqs_dataList, alt_ser_reqs_dataItem); @@ -937,16 +940,28 @@ OpenAPI_media_component_t *OpenAPI_media_component_parseFromJSON(cJSON *media_co tsn_qos = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "tsnQos"); if (tsn_qos) { tsn_qos_local_nonprim = OpenAPI_tsn_qos_container_parseFromJSON(tsn_qos); + if (!tsn_qos_local_nonprim) { + ogs_error("OpenAPI_tsn_qos_container_parseFromJSON failed [tsn_qos]"); + goto end; + } } tscai_input_dl = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "tscaiInputDl"); if (tscai_input_dl) { tscai_input_dl_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_dl); + if (!tscai_input_dl_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_dl]"); + goto end; + } } tscai_input_ul = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "tscaiInputUl"); if (tscai_input_ul) { tscai_input_ul_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_ul); + if (!tscai_input_ul_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_ul]"); + goto end; + } } tscai_time_dom = cJSON_GetObjectItemCaseSensitive(media_componentJSON, "tscaiTimeDom"); diff --git a/lib/sbi/openapi/model/media_component_rm.c b/lib/sbi/openapi/model/media_component_rm.c index 0195872f1..f3cb0f48e 100644 --- a/lib/sbi/openapi/model/media_component_rm.c +++ b/lib/sbi/openapi/model/media_component_rm.c @@ -635,6 +635,10 @@ OpenAPI_media_component_rm_t *OpenAPI_media_component_rm_parseFromJSON(cJSON *me af_rout_req = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "afRoutReq"); if (af_rout_req) { af_rout_req_local_nonprim = OpenAPI_af_routing_requirement_rm_parseFromJSON(af_rout_req); + if (!af_rout_req_local_nonprim) { + ogs_error("OpenAPI_af_routing_requirement_rm_parseFromJSON failed [af_rout_req]"); + goto end; + } } qos_reference = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "qosReference"); @@ -684,7 +688,6 @@ OpenAPI_media_component_rm_t *OpenAPI_media_component_rm_parseFromJSON(cJSON *me OpenAPI_alternative_service_requirements_data_t *alt_ser_reqs_dataItem = OpenAPI_alternative_service_requirements_data_parseFromJSON(alt_ser_reqs_data_local); if (!alt_ser_reqs_dataItem) { ogs_error("No alt_ser_reqs_dataItem"); - OpenAPI_list_free(alt_ser_reqs_dataList); goto end; } OpenAPI_list_add(alt_ser_reqs_dataList, alt_ser_reqs_dataItem); @@ -889,11 +892,19 @@ OpenAPI_media_component_rm_t *OpenAPI_media_component_rm_parseFromJSON(cJSON *me preempt_cap = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "preemptCap"); if (preempt_cap) { preempt_cap_local_nonprim = OpenAPI_preemption_capability_rm_parseFromJSON(preempt_cap); + if (!preempt_cap_local_nonprim) { + ogs_error("OpenAPI_preemption_capability_rm_parseFromJSON failed [preempt_cap]"); + goto end; + } } preempt_vuln = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "preemptVuln"); if (preempt_vuln) { preempt_vuln_local_nonprim = OpenAPI_preemption_vulnerability_rm_parseFromJSON(preempt_vuln); + if (!preempt_vuln_local_nonprim) { + ogs_error("OpenAPI_preemption_vulnerability_rm_parseFromJSON failed [preempt_vuln]"); + goto end; + } } prio_sharing_ind = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "prioSharingInd"); @@ -949,16 +960,28 @@ OpenAPI_media_component_rm_t *OpenAPI_media_component_rm_parseFromJSON(cJSON *me tsn_qos = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "tsnQos"); if (tsn_qos) { tsn_qos_local_nonprim = OpenAPI_tsn_qos_container_rm_parseFromJSON(tsn_qos); + if (!tsn_qos_local_nonprim) { + ogs_error("OpenAPI_tsn_qos_container_rm_parseFromJSON failed [tsn_qos]"); + goto end; + } } tscai_input_dl = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "tscaiInputDl"); if (tscai_input_dl) { tscai_input_dl_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_dl); + if (!tscai_input_dl_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_dl]"); + goto end; + } } tscai_input_ul = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "tscaiInputUl"); if (tscai_input_ul) { tscai_input_ul_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_ul); + if (!tscai_input_ul_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_ul]"); + goto end; + } } tscai_time_dom = cJSON_GetObjectItemCaseSensitive(media_component_rmJSON, "tscaiTimeDom"); diff --git a/lib/sbi/openapi/model/media_sub_component.c b/lib/sbi/openapi/model/media_sub_component.c index 9ad792200..08ae9e1a8 100644 --- a/lib/sbi/openapi/model/media_sub_component.c +++ b/lib/sbi/openapi/model/media_sub_component.c @@ -205,7 +205,6 @@ OpenAPI_media_sub_component_t *OpenAPI_media_sub_component_parseFromJSON(cJSON * OpenAPI_eth_flow_description_t *ethf_descsItem = OpenAPI_eth_flow_description_parseFromJSON(ethf_descs_local); if (!ethf_descsItem) { ogs_error("No ethf_descsItem"); - OpenAPI_list_free(ethf_descsList); goto end; } OpenAPI_list_add(ethf_descsList, ethf_descsItem); diff --git a/lib/sbi/openapi/model/media_sub_component_rm.c b/lib/sbi/openapi/model/media_sub_component_rm.c index abee00798..1419acc1b 100644 --- a/lib/sbi/openapi/model/media_sub_component_rm.c +++ b/lib/sbi/openapi/model/media_sub_component_rm.c @@ -205,7 +205,6 @@ OpenAPI_media_sub_component_rm_t *OpenAPI_media_sub_component_rm_parseFromJSON(c OpenAPI_eth_flow_description_t *ethf_descsItem = OpenAPI_eth_flow_description_parseFromJSON(ethf_descs_local); if (!ethf_descsItem) { ogs_error("No ethf_descsItem"); - OpenAPI_list_free(ethf_descsList); goto end; } OpenAPI_list_add(ethf_descsList, ethf_descsItem); diff --git a/lib/sbi/openapi/model/message_waiting_data.c b/lib/sbi/openapi/model/message_waiting_data.c index d3c77ee80..f23fe0de0 100644 --- a/lib/sbi/openapi/model/message_waiting_data.c +++ b/lib/sbi/openapi/model/message_waiting_data.c @@ -88,7 +88,6 @@ OpenAPI_message_waiting_data_t *OpenAPI_message_waiting_data_parseFromJSON(cJSON OpenAPI_smsc_data_t *mwd_listItem = OpenAPI_smsc_data_parseFromJSON(mwd_list_local); if (!mwd_listItem) { ogs_error("No mwd_listItem"); - OpenAPI_list_free(mwd_listList); goto end; } OpenAPI_list_add(mwd_listList, mwd_listItem); diff --git a/lib/sbi/openapi/model/mfaf_info.c b/lib/sbi/openapi/model/mfaf_info.c index d4856c279..86fecca8e 100644 --- a/lib/sbi/openapi/model/mfaf_info.c +++ b/lib/sbi/openapi/model/mfaf_info.c @@ -202,7 +202,6 @@ OpenAPI_mfaf_info_t *OpenAPI_mfaf_info_parseFromJSON(cJSON *mfaf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -227,7 +226,6 @@ OpenAPI_mfaf_info_t *OpenAPI_mfaf_info_parseFromJSON(cJSON *mfaf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/ml_analytics_info.c b/lib/sbi/openapi/model/ml_analytics_info.c index 71c67fa27..5459099c2 100644 --- a/lib/sbi/openapi/model/ml_analytics_info.c +++ b/lib/sbi/openapi/model/ml_analytics_info.c @@ -142,7 +142,6 @@ OpenAPI_ml_analytics_info_t *OpenAPI_ml_analytics_info_parseFromJSON(cJSON *ml_a OpenAPI_nwdaf_event_t *ml_analytics_idsItem = OpenAPI_nwdaf_event_parseFromJSON(ml_analytics_ids_local); if (!ml_analytics_idsItem) { ogs_error("No ml_analytics_idsItem"); - OpenAPI_list_free(ml_analytics_idsList); goto end; } OpenAPI_list_add(ml_analytics_idsList, ml_analytics_idsItem); @@ -167,7 +166,6 @@ OpenAPI_ml_analytics_info_t *OpenAPI_ml_analytics_info_parseFromJSON(cJSON *ml_a OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); @@ -192,7 +190,6 @@ OpenAPI_ml_analytics_info_t *OpenAPI_ml_analytics_info_parseFromJSON(cJSON *ml_a OpenAPI_tai_t *tracking_area_listItem = OpenAPI_tai_parseFromJSON(tracking_area_list_local); if (!tracking_area_listItem) { ogs_error("No tracking_area_listItem"); - OpenAPI_list_free(tracking_area_listList); goto end; } OpenAPI_list_add(tracking_area_listList, tracking_area_listItem); diff --git a/lib/sbi/openapi/model/mm_context.c b/lib/sbi/openapi/model/mm_context.c index af669e0d7..073495b59 100644 --- a/lib/sbi/openapi/model/mm_context.c +++ b/lib/sbi/openapi/model/mm_context.c @@ -494,11 +494,19 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) nas_security_mode = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "nasSecurityMode"); if (nas_security_mode) { nas_security_mode_local_nonprim = OpenAPI_nas_security_mode_parseFromJSON(nas_security_mode); + if (!nas_security_mode_local_nonprim) { + ogs_error("OpenAPI_nas_security_mode_parseFromJSON failed [nas_security_mode]"); + goto end; + } } eps_nas_security_mode = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "epsNasSecurityMode"); if (eps_nas_security_mode) { eps_nas_security_mode_local_nonprim = OpenAPI_eps_nas_security_mode_parseFromJSON(eps_nas_security_mode); + if (!eps_nas_security_mode_local_nonprim) { + ogs_error("OpenAPI_eps_nas_security_mode_parseFromJSON failed [eps_nas_security_mode]"); + goto end; + } } nas_downlink_count = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "nasDownlinkCount"); @@ -551,7 +559,6 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) OpenAPI_snssai_t *allowed_nssaiItem = OpenAPI_snssai_parseFromJSON(allowed_nssai_local); if (!allowed_nssaiItem) { ogs_error("No allowed_nssaiItem"); - OpenAPI_list_free(allowed_nssaiList); goto end; } OpenAPI_list_add(allowed_nssaiList, allowed_nssaiItem); @@ -576,7 +583,6 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) OpenAPI_nssai_mapping_t *nssai_mapping_listItem = OpenAPI_nssai_mapping_parseFromJSON(nssai_mapping_list_local); if (!nssai_mapping_listItem) { ogs_error("No nssai_mapping_listItem"); - OpenAPI_list_free(nssai_mapping_listList); goto end; } OpenAPI_list_add(nssai_mapping_listList, nssai_mapping_listItem); @@ -601,7 +607,6 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) OpenAPI_snssai_t *allowed_home_nssaiItem = OpenAPI_snssai_parseFromJSON(allowed_home_nssai_local); if (!allowed_home_nssaiItem) { ogs_error("No allowed_home_nssaiItem"); - OpenAPI_list_free(allowed_home_nssaiList); goto end; } OpenAPI_list_add(allowed_home_nssaiList, allowed_home_nssaiItem); @@ -632,11 +637,19 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) expected_u_ebehavior = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "expectedUEbehavior"); if (expected_u_ebehavior) { expected_u_ebehavior_local_nonprim = OpenAPI_expected_ue_behavior_parseFromJSON(expected_u_ebehavior); + if (!expected_u_ebehavior_local_nonprim) { + ogs_error("OpenAPI_expected_ue_behavior_parseFromJSON failed [expected_u_ebehavior]"); + goto end; + } } ue_differentiation_info = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "ueDifferentiationInfo"); if (ue_differentiation_info) { ue_differentiation_info_local_nonprim = OpenAPI_ue_differentiation_info_parseFromJSON(ue_differentiation_info); + if (!ue_differentiation_info_local_nonprim) { + ogs_error("OpenAPI_ue_differentiation_info_parseFromJSON failed [ue_differentiation_info]"); + goto end; + } } plmn_assi_ue_radio_cap_id = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "plmnAssiUeRadioCapId"); @@ -666,16 +679,28 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) n3_iwf_id = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "n3IwfId"); if (n3_iwf_id) { n3_iwf_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(n3_iwf_id); + if (!n3_iwf_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [n3_iwf_id]"); + goto end; + } } wagf_id = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "wagfId"); if (wagf_id) { wagf_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(wagf_id); + if (!wagf_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [wagf_id]"); + goto end; + } } tngf_id = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "tngfId"); if (tngf_id) { tngf_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(tngf_id); + if (!tngf_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [tngf_id]"); + goto end; + } } an_n2_ap_id = cJSON_GetObjectItemCaseSensitive(mm_contextJSON, "anN2ApId"); @@ -704,7 +729,6 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) OpenAPI_nssaa_status_t *nssaa_status_listItem = OpenAPI_nssaa_status_parseFromJSON(nssaa_status_list_local); if (!nssaa_status_listItem) { ogs_error("No nssaa_status_listItem"); - OpenAPI_list_free(nssaa_status_listList); goto end; } OpenAPI_list_add(nssaa_status_listList, nssaa_status_listItem); @@ -729,7 +753,6 @@ OpenAPI_mm_context_t *OpenAPI_mm_context_parseFromJSON(cJSON *mm_contextJSON) OpenAPI_nssai_mapping_t *pending_nssai_mapping_listItem = OpenAPI_nssai_mapping_parseFromJSON(pending_nssai_mapping_list_local); if (!pending_nssai_mapping_listItem) { ogs_error("No pending_nssai_mapping_listItem"); - OpenAPI_list_free(pending_nssai_mapping_listList); goto end; } OpenAPI_list_add(pending_nssai_mapping_listList, pending_nssai_mapping_listItem); diff --git a/lib/sbi/openapi/model/mnpf_info.c b/lib/sbi/openapi/model/mnpf_info.c index 618c6e5ac..c2ec7b8f3 100644 --- a/lib/sbi/openapi/model/mnpf_info.c +++ b/lib/sbi/openapi/model/mnpf_info.c @@ -93,7 +93,6 @@ OpenAPI_mnpf_info_t *OpenAPI_mnpf_info_parseFromJSON(cJSON *mnpf_infoJSON) OpenAPI_identity_range_t *msisdn_rangesItem = OpenAPI_identity_range_parseFromJSON(msisdn_ranges_local); if (!msisdn_rangesItem) { ogs_error("No msisdn_rangesItem"); - OpenAPI_list_free(msisdn_rangesList); goto end; } OpenAPI_list_add(msisdn_rangesList, msisdn_rangesItem); diff --git a/lib/sbi/openapi/model/model_5_g_ddnmf_info.c b/lib/sbi/openapi/model/model_5_g_ddnmf_info.c index c47d238f1..e5248d153 100644 --- a/lib/sbi/openapi/model/model_5_g_ddnmf_info.c +++ b/lib/sbi/openapi/model/model_5_g_ddnmf_info.c @@ -72,6 +72,10 @@ OpenAPI_model_5_g_ddnmf_info_t *OpenAPI_model_5_g_ddnmf_info_parseFromJSON(cJSON goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } model_5_g_ddnmf_info_local_var = OpenAPI_model_5_g_ddnmf_info_create ( plmn_id_local_nonprim diff --git a/lib/sbi/openapi/model/model_5_gvn_group_configuration.c b/lib/sbi/openapi/model/model_5_gvn_group_configuration.c index 71ee26332..63f992f28 100644 --- a/lib/sbi/openapi/model/model_5_gvn_group_configuration.c +++ b/lib/sbi/openapi/model/model_5_gvn_group_configuration.c @@ -146,6 +146,10 @@ OpenAPI_model_5_gvn_group_configuration_t *OpenAPI_model_5_gvn_group_configurati _5g_vn_group_data = cJSON_GetObjectItemCaseSensitive(model_5_gvn_group_configurationJSON, "5gVnGroupData"); if (_5g_vn_group_data) { _5g_vn_group_data_local_nonprim = OpenAPI_model_5_gvn_group_data_parseFromJSON(_5g_vn_group_data); + if (!_5g_vn_group_data_local_nonprim) { + ogs_error("OpenAPI_model_5_gvn_group_data_parseFromJSON failed [_5g_vn_group_data]"); + goto end; + } } members = cJSON_GetObjectItemCaseSensitive(model_5_gvn_group_configurationJSON, "members"); diff --git a/lib/sbi/openapi/model/model_5_gvn_group_data.c b/lib/sbi/openapi/model/model_5_gvn_group_data.c index bca2c518a..bb1ea99aa 100644 --- a/lib/sbi/openapi/model/model_5_gvn_group_data.c +++ b/lib/sbi/openapi/model/model_5_gvn_group_data.c @@ -233,6 +233,10 @@ OpenAPI_model_5_gvn_group_data_t *OpenAPI_model_5_gvn_group_data_parseFromJSON(c goto end; } s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } pdu_session_types = cJSON_GetObjectItemCaseSensitive(model_5_gvn_group_dataJSON, "pduSessionTypes"); if (pdu_session_types) { @@ -271,7 +275,6 @@ OpenAPI_model_5_gvn_group_data_t *OpenAPI_model_5_gvn_group_data_parseFromJSON(c OpenAPI_app_descriptor_t *app_descriptorsItem = OpenAPI_app_descriptor_parseFromJSON(app_descriptors_local); if (!app_descriptorsItem) { ogs_error("No app_descriptorsItem"); - OpenAPI_list_free(app_descriptorsList); goto end; } OpenAPI_list_add(app_descriptorsList, app_descriptorsItem); @@ -297,6 +300,10 @@ OpenAPI_model_5_gvn_group_data_t *OpenAPI_model_5_gvn_group_data_parseFromJSON(c dn_aaa_address = cJSON_GetObjectItemCaseSensitive(model_5_gvn_group_dataJSON, "dnAaaAddress"); if (dn_aaa_address) { dn_aaa_address_local_nonprim = OpenAPI_ip_address_1_parseFromJSON(dn_aaa_address); + if (!dn_aaa_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_1_parseFromJSON failed [dn_aaa_address]"); + goto end; + } } additional_dn_aaa_addresses = cJSON_GetObjectItemCaseSensitive(model_5_gvn_group_dataJSON, "additionalDnAaaAddresses"); @@ -317,7 +324,6 @@ OpenAPI_model_5_gvn_group_data_t *OpenAPI_model_5_gvn_group_data_parseFromJSON(c OpenAPI_ip_address_1_t *additional_dn_aaa_addressesItem = OpenAPI_ip_address_1_parseFromJSON(additional_dn_aaa_addresses_local); if (!additional_dn_aaa_addressesItem) { ogs_error("No additional_dn_aaa_addressesItem"); - OpenAPI_list_free(additional_dn_aaa_addressesList); goto end; } OpenAPI_list_add(additional_dn_aaa_addressesList, additional_dn_aaa_addressesItem); diff --git a/lib/sbi/openapi/model/model_5_mbs_authorization_info.c b/lib/sbi/openapi/model/model_5_mbs_authorization_info.c index 325ad7e64..ac66975c2 100644 --- a/lib/sbi/openapi/model/model_5_mbs_authorization_info.c +++ b/lib/sbi/openapi/model/model_5_mbs_authorization_info.c @@ -88,7 +88,6 @@ OpenAPI_model_5_mbs_authorization_info_t *OpenAPI_model_5_mbs_authorization_info OpenAPI_mbs_session_id_t *_5mbs_session_idsItem = OpenAPI_mbs_session_id_parseFromJSON(_5mbs_session_ids_local); if (!_5mbs_session_idsItem) { ogs_error("No _5mbs_session_idsItem"); - OpenAPI_list_free(_5mbs_session_idsList); goto end; } OpenAPI_list_add(_5mbs_session_idsList, _5mbs_session_idsItem); diff --git a/lib/sbi/openapi/model/modification_notification.c b/lib/sbi/openapi/model/modification_notification.c index 172fdae8e..993a36a57 100644 --- a/lib/sbi/openapi/model/modification_notification.c +++ b/lib/sbi/openapi/model/modification_notification.c @@ -93,7 +93,6 @@ OpenAPI_modification_notification_t *OpenAPI_modification_notification_parseFrom OpenAPI_notify_item_t *notify_itemsItem = OpenAPI_notify_item_parseFromJSON(notify_items_local); if (!notify_itemsItem) { ogs_error("No notify_itemsItem"); - OpenAPI_list_free(notify_itemsList); goto end; } OpenAPI_list_add(notify_itemsList, notify_itemsItem); diff --git a/lib/sbi/openapi/model/modify_200_response.c b/lib/sbi/openapi/model/modify_200_response.c index dfcdfe813..9e0787728 100644 --- a/lib/sbi/openapi/model/modify_200_response.c +++ b/lib/sbi/openapi/model/modify_200_response.c @@ -428,6 +428,10 @@ OpenAPI_modify_200_response_t *OpenAPI_modify_200_response_parseFromJSON(cJSON * single_nssai = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "dnn"); @@ -449,6 +453,10 @@ OpenAPI_modify_200_response_t *OpenAPI_modify_200_response_parseFromJSON(cJSON * plmn_id = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } immediate_report = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "immediateReport"); @@ -480,7 +488,6 @@ OpenAPI_modify_200_response_t *OpenAPI_modify_200_response_parseFromJSON(cJSON * OpenAPI_report_item_t *reportItem = OpenAPI_report_item_parseFromJSON(report_local); if (!reportItem) { ogs_error("No reportItem"); - OpenAPI_list_free(reportList); goto end; } OpenAPI_list_add(reportList, reportItem); @@ -497,6 +504,10 @@ OpenAPI_modify_200_response_t *OpenAPI_modify_200_response_parseFromJSON(cJSON * context_info = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } nf_change_filter = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "nfChangeFilter"); @@ -539,6 +550,10 @@ OpenAPI_modify_200_response_t *OpenAPI_modify_200_response_parseFromJSON(cJSON * ue_con_smf_data_sub_filter = cJSON_GetObjectItemCaseSensitive(modify_200_responseJSON, "ueConSmfDataSubFilter"); if (ue_con_smf_data_sub_filter) { ue_con_smf_data_sub_filter_local_nonprim = OpenAPI_ue_context_in_smf_data_sub_filter_parseFromJSON(ue_con_smf_data_sub_filter); + if (!ue_con_smf_data_sub_filter_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smf_data_sub_filter_parseFromJSON failed [ue_con_smf_data_sub_filter]"); + goto end; + } } modify_200_response_local_var = OpenAPI_modify_200_response_create ( diff --git a/lib/sbi/openapi/model/modifysubscription_data_subscription_200_response.c b/lib/sbi/openapi/model/modifysubscription_data_subscription_200_response.c index eb1d86fee..52c4e6def 100644 --- a/lib/sbi/openapi/model/modifysubscription_data_subscription_200_response.c +++ b/lib/sbi/openapi/model/modifysubscription_data_subscription_200_response.c @@ -260,7 +260,6 @@ OpenAPI_modifysubscription_data_subscription_200_response_t *OpenAPI_modifysubsc OpenAPI_report_item_t *reportItem = OpenAPI_report_item_parseFromJSON(report_local); if (!reportItem) { ogs_error("No reportItem"); - OpenAPI_list_free(reportList); goto end; } OpenAPI_list_add(reportList, reportItem); @@ -326,11 +325,19 @@ OpenAPI_modifysubscription_data_subscription_200_response_t *OpenAPI_modifysubsc sdm_subscription = cJSON_GetObjectItemCaseSensitive(modifysubscription_data_subscription_200_responseJSON, "sdmSubscription"); if (sdm_subscription) { sdm_subscription_local_nonprim = OpenAPI_sdm_subscription_1_parseFromJSON(sdm_subscription); + if (!sdm_subscription_local_nonprim) { + ogs_error("OpenAPI_sdm_subscription_1_parseFromJSON failed [sdm_subscription]"); + goto end; + } } hss_subscription_info = cJSON_GetObjectItemCaseSensitive(modifysubscription_data_subscription_200_responseJSON, "hssSubscriptionInfo"); if (hss_subscription_info) { hss_subscription_info_local_nonprim = OpenAPI_hss_subscription_info_parseFromJSON(hss_subscription_info); + if (!hss_subscription_info_local_nonprim) { + ogs_error("OpenAPI_hss_subscription_info_parseFromJSON failed [hss_subscription_info]"); + goto end; + } } subscription_id = cJSON_GetObjectItemCaseSensitive(modifysubscription_data_subscription_200_responseJSON, "subscriptionId"); diff --git a/lib/sbi/openapi/model/monitoring_configuration.c b/lib/sbi/openapi/model/monitoring_configuration.c index 39ce0eec9..a191d0162 100644 --- a/lib/sbi/openapi/model/monitoring_configuration.c +++ b/lib/sbi/openapi/model/monitoring_configuration.c @@ -342,6 +342,10 @@ OpenAPI_monitoring_configuration_t *OpenAPI_monitoring_configuration_parseFromJS goto end; } event_type_local_nonprim = OpenAPI_event_type_parseFromJSON(event_type); + if (!event_type_local_nonprim) { + ogs_error("OpenAPI_event_type_parseFromJSON failed [event_type]"); + goto end; + } immediate_flag = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "immediateFlag"); if (immediate_flag) { @@ -354,21 +358,37 @@ OpenAPI_monitoring_configuration_t *OpenAPI_monitoring_configuration_parseFromJS location_reporting_configuration = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "locationReportingConfiguration"); if (location_reporting_configuration) { location_reporting_configuration_local_nonprim = OpenAPI_location_reporting_configuration_parseFromJSON(location_reporting_configuration); + if (!location_reporting_configuration_local_nonprim) { + ogs_error("OpenAPI_location_reporting_configuration_parseFromJSON failed [location_reporting_configuration]"); + goto end; + } } association_type = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "associationType"); if (association_type) { association_type_local_nonprim = OpenAPI_association_type_parseFromJSON(association_type); + if (!association_type_local_nonprim) { + ogs_error("OpenAPI_association_type_parseFromJSON failed [association_type]"); + goto end; + } } datalink_report_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "datalinkReportCfg"); if (datalink_report_cfg) { datalink_report_cfg_local_nonprim = OpenAPI_datalink_reporting_configuration_parseFromJSON(datalink_report_cfg); + if (!datalink_report_cfg_local_nonprim) { + ogs_error("OpenAPI_datalink_reporting_configuration_parseFromJSON failed [datalink_report_cfg]"); + goto end; + } } loss_connectivity_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "lossConnectivityCfg"); if (loss_connectivity_cfg) { loss_connectivity_cfg_local_nonprim = OpenAPI_loss_connectivity_cfg_parseFromJSON(loss_connectivity_cfg); + if (!loss_connectivity_cfg_local_nonprim) { + ogs_error("OpenAPI_loss_connectivity_cfg_parseFromJSON failed [loss_connectivity_cfg]"); + goto end; + } } maximum_latency = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "maximumLatency"); @@ -406,16 +426,28 @@ OpenAPI_monitoring_configuration_t *OpenAPI_monitoring_configuration_parseFromJS single_nssai = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } pdu_session_status_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "pduSessionStatusCfg"); if (pdu_session_status_cfg) { pdu_session_status_cfg_local_nonprim = OpenAPI_pdu_session_status_cfg_parseFromJSON(pdu_session_status_cfg); + if (!pdu_session_status_cfg_local_nonprim) { + ogs_error("OpenAPI_pdu_session_status_cfg_parseFromJSON failed [pdu_session_status_cfg]"); + goto end; + } } reachability_for_sms_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "reachabilityForSmsCfg"); if (reachability_for_sms_cfg) { reachability_for_sms_cfg_local_nonprim = OpenAPI_reachability_for_sms_configuration_parseFromJSON(reachability_for_sms_cfg); + if (!reachability_for_sms_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_sms_configuration_parseFromJSON failed [reachability_for_sms_cfg]"); + goto end; + } } mtc_provider_information = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "mtcProviderInformation"); @@ -437,6 +469,10 @@ OpenAPI_monitoring_configuration_t *OpenAPI_monitoring_configuration_parseFromJS reachability_for_data_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "reachabilityForDataCfg"); if (reachability_for_data_cfg) { reachability_for_data_cfg_local_nonprim = OpenAPI_reachability_for_data_configuration_parseFromJSON(reachability_for_data_cfg); + if (!reachability_for_data_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_data_configuration_parseFromJSON failed [reachability_for_data_cfg]"); + goto end; + } } idle_status_ind = cJSON_GetObjectItemCaseSensitive(monitoring_configurationJSON, "idleStatusInd"); diff --git a/lib/sbi/openapi/model/monitoring_configuration_1.c b/lib/sbi/openapi/model/monitoring_configuration_1.c index d25b0cab5..1b5738777 100644 --- a/lib/sbi/openapi/model/monitoring_configuration_1.c +++ b/lib/sbi/openapi/model/monitoring_configuration_1.c @@ -342,6 +342,10 @@ OpenAPI_monitoring_configuration_1_t *OpenAPI_monitoring_configuration_1_parseFr goto end; } event_type_local_nonprim = OpenAPI_event_type_parseFromJSON(event_type); + if (!event_type_local_nonprim) { + ogs_error("OpenAPI_event_type_parseFromJSON failed [event_type]"); + goto end; + } immediate_flag = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "immediateFlag"); if (immediate_flag) { @@ -354,21 +358,37 @@ OpenAPI_monitoring_configuration_1_t *OpenAPI_monitoring_configuration_1_parseFr location_reporting_configuration = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "locationReportingConfiguration"); if (location_reporting_configuration) { location_reporting_configuration_local_nonprim = OpenAPI_location_reporting_configuration_1_parseFromJSON(location_reporting_configuration); + if (!location_reporting_configuration_local_nonprim) { + ogs_error("OpenAPI_location_reporting_configuration_1_parseFromJSON failed [location_reporting_configuration]"); + goto end; + } } association_type = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "associationType"); if (association_type) { association_type_local_nonprim = OpenAPI_association_type_parseFromJSON(association_type); + if (!association_type_local_nonprim) { + ogs_error("OpenAPI_association_type_parseFromJSON failed [association_type]"); + goto end; + } } datalink_report_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "datalinkReportCfg"); if (datalink_report_cfg) { datalink_report_cfg_local_nonprim = OpenAPI_datalink_reporting_configuration_1_parseFromJSON(datalink_report_cfg); + if (!datalink_report_cfg_local_nonprim) { + ogs_error("OpenAPI_datalink_reporting_configuration_1_parseFromJSON failed [datalink_report_cfg]"); + goto end; + } } loss_connectivity_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "lossConnectivityCfg"); if (loss_connectivity_cfg) { loss_connectivity_cfg_local_nonprim = OpenAPI_loss_connectivity_cfg_1_parseFromJSON(loss_connectivity_cfg); + if (!loss_connectivity_cfg_local_nonprim) { + ogs_error("OpenAPI_loss_connectivity_cfg_1_parseFromJSON failed [loss_connectivity_cfg]"); + goto end; + } } maximum_latency = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "maximumLatency"); @@ -406,16 +426,28 @@ OpenAPI_monitoring_configuration_1_t *OpenAPI_monitoring_configuration_1_parseFr single_nssai = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } pdu_session_status_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "pduSessionStatusCfg"); if (pdu_session_status_cfg) { pdu_session_status_cfg_local_nonprim = OpenAPI_pdu_session_status_cfg_1_parseFromJSON(pdu_session_status_cfg); + if (!pdu_session_status_cfg_local_nonprim) { + ogs_error("OpenAPI_pdu_session_status_cfg_1_parseFromJSON failed [pdu_session_status_cfg]"); + goto end; + } } reachability_for_sms_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "reachabilityForSmsCfg"); if (reachability_for_sms_cfg) { reachability_for_sms_cfg_local_nonprim = OpenAPI_reachability_for_sms_configuration_parseFromJSON(reachability_for_sms_cfg); + if (!reachability_for_sms_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_sms_configuration_parseFromJSON failed [reachability_for_sms_cfg]"); + goto end; + } } mtc_provider_information = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "mtcProviderInformation"); @@ -437,6 +469,10 @@ OpenAPI_monitoring_configuration_1_t *OpenAPI_monitoring_configuration_1_parseFr reachability_for_data_cfg = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "reachabilityForDataCfg"); if (reachability_for_data_cfg) { reachability_for_data_cfg_local_nonprim = OpenAPI_reachability_for_data_configuration_1_parseFromJSON(reachability_for_data_cfg); + if (!reachability_for_data_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_data_configuration_1_parseFromJSON failed [reachability_for_data_cfg]"); + goto end; + } } idle_status_ind = cJSON_GetObjectItemCaseSensitive(monitoring_configuration_1JSON, "idleStatusInd"); diff --git a/lib/sbi/openapi/model/multicast_access_control.c b/lib/sbi/openapi/model/multicast_access_control.c index 6ce7e7290..6b20c4435 100644 --- a/lib/sbi/openapi/model/multicast_access_control.c +++ b/lib/sbi/openapi/model/multicast_access_control.c @@ -160,6 +160,10 @@ OpenAPI_multicast_access_control_t *OpenAPI_multicast_access_control_parseFromJS goto end; } acc_status_local_nonprim = OpenAPI_access_right_status_parseFromJSON(acc_status); + if (!acc_status_local_nonprim) { + ogs_error("OpenAPI_access_right_status_parseFromJSON failed [acc_status]"); + goto end; + } multicast_access_control_local_var = OpenAPI_multicast_access_control_create ( src_ipv4_addr && !cJSON_IsNull(src_ipv4_addr) ? ogs_strdup(src_ipv4_addr->valuestring) : NULL, diff --git a/lib/sbi/openapi/model/n1_message_container.c b/lib/sbi/openapi/model/n1_message_container.c index 22e98f467..3f988b084 100644 --- a/lib/sbi/openapi/model/n1_message_container.c +++ b/lib/sbi/openapi/model/n1_message_container.c @@ -124,6 +124,10 @@ OpenAPI_n1_message_container_t *OpenAPI_n1_message_container_parseFromJSON(cJSON goto end; } n1_message_content_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_message_content); + if (!n1_message_content_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_message_content]"); + goto end; + } nf_id = cJSON_GetObjectItemCaseSensitive(n1_message_containerJSON, "nfId"); if (nf_id) { diff --git a/lib/sbi/openapi/model/n1_message_notification.c b/lib/sbi/openapi/model/n1_message_notification.c index 45b4765dd..a141e8112 100644 --- a/lib/sbi/openapi/model/n1_message_notification.c +++ b/lib/sbi/openapi/model/n1_message_notification.c @@ -218,6 +218,10 @@ OpenAPI_n1_message_notification_t *OpenAPI_n1_message_notification_parseFromJSON goto end; } n1_message_container_local_nonprim = OpenAPI_n1_message_container_parseFromJSON(n1_message_container); + if (!n1_message_container_local_nonprim) { + ogs_error("OpenAPI_n1_message_container_parseFromJSON failed [n1_message_container]"); + goto end; + } lcs_correlation_id = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "lcsCorrelationId"); if (lcs_correlation_id) { @@ -230,6 +234,10 @@ OpenAPI_n1_message_notification_t *OpenAPI_n1_message_notification_parseFromJSON registration_ctxt_container = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "registrationCtxtContainer"); if (registration_ctxt_container) { registration_ctxt_container_local_nonprim = OpenAPI_registration_context_container_parseFromJSON(registration_ctxt_container); + if (!registration_ctxt_container_local_nonprim) { + ogs_error("OpenAPI_registration_context_container_parseFromJSON failed [registration_ctxt_container]"); + goto end; + } } new_lmf_identification = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "newLmfIdentification"); @@ -243,6 +251,10 @@ OpenAPI_n1_message_notification_t *OpenAPI_n1_message_notification_parseFromJSON guami = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } c_io_t5_gs_optimisation = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "cIoT5GSOptimisation"); @@ -256,11 +268,19 @@ OpenAPI_n1_message_notification_t *OpenAPI_n1_message_notification_parseFromJSON ecgi = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "ecgi"); if (ecgi) { ecgi_local_nonprim = OpenAPI_ecgi_parseFromJSON(ecgi); + if (!ecgi_local_nonprim) { + ogs_error("OpenAPI_ecgi_parseFromJSON failed [ecgi]"); + goto end; + } } ncgi = cJSON_GetObjectItemCaseSensitive(n1_message_notificationJSON, "ncgi"); if (ncgi) { ncgi_local_nonprim = OpenAPI_ncgi_parseFromJSON(ncgi); + if (!ncgi_local_nonprim) { + ogs_error("OpenAPI_ncgi_parseFromJSON failed [ncgi]"); + goto end; + } } n1_message_notification_local_var = OpenAPI_n1_message_notification_create ( diff --git a/lib/sbi/openapi/model/n1_n2_message_transfer_error.c b/lib/sbi/openapi/model/n1_n2_message_transfer_error.c index 7831fdc80..2448fac37 100644 --- a/lib/sbi/openapi/model/n1_n2_message_transfer_error.c +++ b/lib/sbi/openapi/model/n1_n2_message_transfer_error.c @@ -93,10 +93,18 @@ OpenAPI_n1_n2_message_transfer_error_t *OpenAPI_n1_n2_message_transfer_error_par goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } err_info = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_errorJSON, "errInfo"); if (err_info) { err_info_local_nonprim = OpenAPI_n1_n2_msg_txfr_err_detail_parseFromJSON(err_info); + if (!err_info_local_nonprim) { + ogs_error("OpenAPI_n1_n2_msg_txfr_err_detail_parseFromJSON failed [err_info]"); + goto end; + } } n1_n2_message_transfer_error_local_var = OpenAPI_n1_n2_message_transfer_error_create ( diff --git a/lib/sbi/openapi/model/n1_n2_message_transfer_req_data.c b/lib/sbi/openapi/model/n1_n2_message_transfer_req_data.c index 291af587f..986785808 100644 --- a/lib/sbi/openapi/model/n1_n2_message_transfer_req_data.c +++ b/lib/sbi/openapi/model/n1_n2_message_transfer_req_data.c @@ -335,16 +335,28 @@ OpenAPI_n1_n2_message_transfer_req_data_t *OpenAPI_n1_n2_message_transfer_req_da n1_message_container = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "n1MessageContainer"); if (n1_message_container) { n1_message_container_local_nonprim = OpenAPI_n1_message_container_parseFromJSON(n1_message_container); + if (!n1_message_container_local_nonprim) { + ogs_error("OpenAPI_n1_message_container_parseFromJSON failed [n1_message_container]"); + goto end; + } } n2_info_container = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "n2InfoContainer"); if (n2_info_container) { n2_info_container_local_nonprim = OpenAPI_n2_info_container_parseFromJSON(n2_info_container); + if (!n2_info_container_local_nonprim) { + ogs_error("OpenAPI_n2_info_container_parseFromJSON failed [n2_info_container]"); + goto end; + } } mt_data = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "mtData"); if (mt_data) { mt_data_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(mt_data); + if (!mt_data_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [mt_data]"); + goto end; + } } skip_ind = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "skipInd"); @@ -390,6 +402,10 @@ OpenAPI_n1_n2_message_transfer_req_data_t *OpenAPI_n1_n2_message_transfer_req_da arp = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "arp"); if (arp) { arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } } _5qi = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "5qi"); @@ -419,6 +435,10 @@ OpenAPI_n1_n2_message_transfer_req_data_t *OpenAPI_n1_n2_message_transfer_req_da area_of_validity = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "areaOfValidity"); if (area_of_validity) { area_of_validity_local_nonprim = OpenAPI_area_of_validity_parseFromJSON(area_of_validity); + if (!area_of_validity_local_nonprim) { + ogs_error("OpenAPI_area_of_validity_parseFromJSON failed [area_of_validity]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "supportedFeatures"); @@ -432,6 +452,10 @@ OpenAPI_n1_n2_message_transfer_req_data_t *OpenAPI_n1_n2_message_transfer_req_da old_guami = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "oldGuami"); if (old_guami) { old_guami_local_nonprim = OpenAPI_guami_parseFromJSON(old_guami); + if (!old_guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [old_guami]"); + goto end; + } } ma_accepted_ind = cJSON_GetObjectItemCaseSensitive(n1_n2_message_transfer_req_dataJSON, "maAcceptedInd"); diff --git a/lib/sbi/openapi/model/n1_n2_msg_txfr_err_detail.c b/lib/sbi/openapi/model/n1_n2_msg_txfr_err_detail.c index dd3184e80..687d19721 100644 --- a/lib/sbi/openapi/model/n1_n2_msg_txfr_err_detail.c +++ b/lib/sbi/openapi/model/n1_n2_msg_txfr_err_detail.c @@ -99,6 +99,10 @@ OpenAPI_n1_n2_msg_txfr_err_detail_t *OpenAPI_n1_n2_msg_txfr_err_detail_parseFrom highest_prio_arp = cJSON_GetObjectItemCaseSensitive(n1_n2_msg_txfr_err_detailJSON, "highestPrioArp"); if (highest_prio_arp) { highest_prio_arp_local_nonprim = OpenAPI_arp_parseFromJSON(highest_prio_arp); + if (!highest_prio_arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [highest_prio_arp]"); + goto end; + } } max_waiting_time = cJSON_GetObjectItemCaseSensitive(n1_n2_msg_txfr_err_detailJSON, "maxWaitingTime"); diff --git a/lib/sbi/openapi/model/n2_info_container.c b/lib/sbi/openapi/model/n2_info_container.c index d293a22bf..9bc451b21 100644 --- a/lib/sbi/openapi/model/n2_info_container.c +++ b/lib/sbi/openapi/model/n2_info_container.c @@ -196,31 +196,55 @@ OpenAPI_n2_info_container_t *OpenAPI_n2_info_container_parseFromJSON(cJSON *n2_i sm_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "smInfo"); if (sm_info) { sm_info_local_nonprim = OpenAPI_n2_sm_information_parseFromJSON(sm_info); + if (!sm_info_local_nonprim) { + ogs_error("OpenAPI_n2_sm_information_parseFromJSON failed [sm_info]"); + goto end; + } } ran_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "ranInfo"); if (ran_info) { ran_info_local_nonprim = OpenAPI_n2_ran_information_parseFromJSON(ran_info); + if (!ran_info_local_nonprim) { + ogs_error("OpenAPI_n2_ran_information_parseFromJSON failed [ran_info]"); + goto end; + } } nrppa_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "nrppaInfo"); if (nrppa_info) { nrppa_info_local_nonprim = OpenAPI_nrppa_information_parseFromJSON(nrppa_info); + if (!nrppa_info_local_nonprim) { + ogs_error("OpenAPI_nrppa_information_parseFromJSON failed [nrppa_info]"); + goto end; + } } pws_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "pwsInfo"); if (pws_info) { pws_info_local_nonprim = OpenAPI_pws_information_parseFromJSON(pws_info); + if (!pws_info_local_nonprim) { + ogs_error("OpenAPI_pws_information_parseFromJSON failed [pws_info]"); + goto end; + } } v2x_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "v2xInfo"); if (v2x_info) { v2x_info_local_nonprim = OpenAPI_v2x_information_parseFromJSON(v2x_info); + if (!v2x_info_local_nonprim) { + ogs_error("OpenAPI_v2x_information_parseFromJSON failed [v2x_info]"); + goto end; + } } prose_info = cJSON_GetObjectItemCaseSensitive(n2_info_containerJSON, "proseInfo"); if (prose_info) { prose_info_local_nonprim = OpenAPI_pro_se_information_parseFromJSON(prose_info); + if (!prose_info_local_nonprim) { + ogs_error("OpenAPI_pro_se_information_parseFromJSON failed [prose_info]"); + goto end; + } } n2_info_container_local_var = OpenAPI_n2_info_container_create ( diff --git a/lib/sbi/openapi/model/n2_info_content.c b/lib/sbi/openapi/model/n2_info_content.c index e07985862..68b194e18 100644 --- a/lib/sbi/openapi/model/n2_info_content.c +++ b/lib/sbi/openapi/model/n2_info_content.c @@ -112,6 +112,10 @@ OpenAPI_n2_info_content_t *OpenAPI_n2_info_content_parseFromJSON(cJSON *n2_info_ goto end; } ngap_data_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(ngap_data); + if (!ngap_data_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [ngap_data]"); + goto end; + } n2_info_content_local_var = OpenAPI_n2_info_content_create ( ngap_message_type ? true : false, diff --git a/lib/sbi/openapi/model/n2_info_notification_rsp_data.c b/lib/sbi/openapi/model/n2_info_notification_rsp_data.c index 130f47df9..aef9bfba9 100644 --- a/lib/sbi/openapi/model/n2_info_notification_rsp_data.c +++ b/lib/sbi/openapi/model/n2_info_notification_rsp_data.c @@ -88,7 +88,6 @@ OpenAPI_n2_info_notification_rsp_data_t *OpenAPI_n2_info_notification_rsp_data_p OpenAPI_n2_sm_information_t *sec_rat_data_usage_listItem = OpenAPI_n2_sm_information_parseFromJSON(sec_rat_data_usage_list_local); if (!sec_rat_data_usage_listItem) { ogs_error("No sec_rat_data_usage_listItem"); - OpenAPI_list_free(sec_rat_data_usage_listList); goto end; } OpenAPI_list_add(sec_rat_data_usage_listList, sec_rat_data_usage_listItem); diff --git a/lib/sbi/openapi/model/n2_info_notify_handover_complete_200_response.c b/lib/sbi/openapi/model/n2_info_notify_handover_complete_200_response.c index 9bfe23018..c69216ff5 100644 --- a/lib/sbi/openapi/model/n2_info_notify_handover_complete_200_response.c +++ b/lib/sbi/openapi/model/n2_info_notify_handover_complete_200_response.c @@ -339,6 +339,10 @@ OpenAPI_n2_info_notify_handover_complete_200_response_t *OpenAPI_n2_info_notify_ json_data = cJSON_GetObjectItemCaseSensitive(n2_info_notify_handover_complete_200_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_n2_info_notification_rsp_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_n2_info_notification_rsp_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information_ext1 = cJSON_GetObjectItemCaseSensitive(n2_info_notify_handover_complete_200_responseJSON, "binaryDataN2InformationExt1"); diff --git a/lib/sbi/openapi/model/n2_info_notify_request.c b/lib/sbi/openapi/model/n2_info_notify_request.c index c73d48bf5..f58068d98 100644 --- a/lib/sbi/openapi/model/n2_info_notify_request.c +++ b/lib/sbi/openapi/model/n2_info_notify_request.c @@ -101,6 +101,10 @@ OpenAPI_n2_info_notify_request_t *OpenAPI_n2_info_notify_request_parseFromJSON(c json_data = cJSON_GetObjectItemCaseSensitive(n2_info_notify_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_n2_information_notification_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_n2_information_notification_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_message = cJSON_GetObjectItemCaseSensitive(n2_info_notify_requestJSON, "binaryDataN1Message"); diff --git a/lib/sbi/openapi/model/n2_information_notification.c b/lib/sbi/openapi/model/n2_information_notification.c index a7a8100c8..da8bf5bb9 100644 --- a/lib/sbi/openapi/model/n2_information_notification.c +++ b/lib/sbi/openapi/model/n2_information_notification.c @@ -266,6 +266,10 @@ OpenAPI_n2_information_notification_t *OpenAPI_n2_information_notification_parse n2_info_container = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "n2InfoContainer"); if (n2_info_container) { n2_info_container_local_nonprim = OpenAPI_n2_info_container_parseFromJSON(n2_info_container); + if (!n2_info_container_local_nonprim) { + ogs_error("OpenAPI_n2_info_container_parseFromJSON failed [n2_info_container]"); + goto end; + } } to_release_session_list = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "toReleaseSessionList"); @@ -330,7 +334,6 @@ OpenAPI_n2_information_notification_t *OpenAPI_n2_information_notification_parse OpenAPI_smf_change_info_t *smf_change_info_listItem = OpenAPI_smf_change_info_parseFromJSON(smf_change_info_list_local); if (!smf_change_info_listItem) { ogs_error("No smf_change_info_listItem"); - OpenAPI_list_free(smf_change_info_listList); goto end; } OpenAPI_list_add(smf_change_info_listList, smf_change_info_listItem); @@ -340,6 +343,10 @@ OpenAPI_n2_information_notification_t *OpenAPI_n2_information_notification_parse ran_node_id = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "ranNodeId"); if (ran_node_id) { ran_node_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(ran_node_id); + if (!ran_node_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [ran_node_id]"); + goto end; + } } initial_amf_name = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "initialAmfName"); @@ -369,6 +376,10 @@ OpenAPI_n2_information_notification_t *OpenAPI_n2_information_notification_parse guami = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } notify_source_ng_ran = cJSON_GetObjectItemCaseSensitive(n2_information_notificationJSON, "notifySourceNgRan"); diff --git a/lib/sbi/openapi/model/n2_information_transfer_error.c b/lib/sbi/openapi/model/n2_information_transfer_error.c index 8c6d1cfaa..907c59840 100644 --- a/lib/sbi/openapi/model/n2_information_transfer_error.c +++ b/lib/sbi/openapi/model/n2_information_transfer_error.c @@ -93,10 +93,18 @@ OpenAPI_n2_information_transfer_error_t *OpenAPI_n2_information_transfer_error_p goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } pws_error_info = cJSON_GetObjectItemCaseSensitive(n2_information_transfer_errorJSON, "pwsErrorInfo"); if (pws_error_info) { pws_error_info_local_nonprim = OpenAPI_pws_error_data_parseFromJSON(pws_error_info); + if (!pws_error_info_local_nonprim) { + ogs_error("OpenAPI_pws_error_data_parseFromJSON failed [pws_error_info]"); + goto end; + } } n2_information_transfer_error_local_var = OpenAPI_n2_information_transfer_error_create ( diff --git a/lib/sbi/openapi/model/n2_information_transfer_req_data.c b/lib/sbi/openapi/model/n2_information_transfer_req_data.c index 69d3e1c25..43e02ef78 100644 --- a/lib/sbi/openapi/model/n2_information_transfer_req_data.c +++ b/lib/sbi/openapi/model/n2_information_transfer_req_data.c @@ -163,7 +163,6 @@ OpenAPI_n2_information_transfer_req_data_t *OpenAPI_n2_information_transfer_req_ OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -197,7 +196,6 @@ OpenAPI_n2_information_transfer_req_data_t *OpenAPI_n2_information_transfer_req_ OpenAPI_global_ran_node_id_t *global_ran_node_listItem = OpenAPI_global_ran_node_id_parseFromJSON(global_ran_node_list_local); if (!global_ran_node_listItem) { ogs_error("No global_ran_node_listItem"); - OpenAPI_list_free(global_ran_node_listList); goto end; } OpenAPI_list_add(global_ran_node_listList, global_ran_node_listItem); @@ -210,6 +208,10 @@ OpenAPI_n2_information_transfer_req_data_t *OpenAPI_n2_information_transfer_req_ goto end; } n2_information_local_nonprim = OpenAPI_n2_info_container_parseFromJSON(n2_information); + if (!n2_information_local_nonprim) { + ogs_error("OpenAPI_n2_info_container_parseFromJSON failed [n2_information]"); + goto end; + } supported_features = cJSON_GetObjectItemCaseSensitive(n2_information_transfer_req_dataJSON, "supportedFeatures"); if (supported_features) { diff --git a/lib/sbi/openapi/model/n2_information_transfer_rsp_data.c b/lib/sbi/openapi/model/n2_information_transfer_rsp_data.c index 320ba4c09..f0e97a98c 100644 --- a/lib/sbi/openapi/model/n2_information_transfer_rsp_data.c +++ b/lib/sbi/openapi/model/n2_information_transfer_rsp_data.c @@ -105,6 +105,10 @@ OpenAPI_n2_information_transfer_rsp_data_t *OpenAPI_n2_information_transfer_rsp_ pws_rsp_data = cJSON_GetObjectItemCaseSensitive(n2_information_transfer_rsp_dataJSON, "pwsRspData"); if (pws_rsp_data) { pws_rsp_data_local_nonprim = OpenAPI_pws_response_data_parseFromJSON(pws_rsp_data); + if (!pws_rsp_data_local_nonprim) { + ogs_error("OpenAPI_pws_response_data_parseFromJSON failed [pws_rsp_data]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(n2_information_transfer_rsp_dataJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/n2_ran_information.c b/lib/sbi/openapi/model/n2_ran_information.c index db324d95b..d7b7ec9ab 100644 --- a/lib/sbi/openapi/model/n2_ran_information.c +++ b/lib/sbi/openapi/model/n2_ran_information.c @@ -72,6 +72,10 @@ OpenAPI_n2_ran_information_t *OpenAPI_n2_ran_information_parseFromJSON(cJSON *n2 goto end; } n2_info_content_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(n2_info_content); + if (!n2_info_content_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [n2_info_content]"); + goto end; + } n2_ran_information_local_var = OpenAPI_n2_ran_information_create ( n2_info_content_local_nonprim diff --git a/lib/sbi/openapi/model/n2_sm_information.c b/lib/sbi/openapi/model/n2_sm_information.c index c5fbe911c..81af81847 100644 --- a/lib/sbi/openapi/model/n2_sm_information.c +++ b/lib/sbi/openapi/model/n2_sm_information.c @@ -160,21 +160,37 @@ OpenAPI_n2_sm_information_t *OpenAPI_n2_sm_information_parseFromJSON(cJSON *n2_s n2_info_content = cJSON_GetObjectItemCaseSensitive(n2_sm_informationJSON, "n2InfoContent"); if (n2_info_content) { n2_info_content_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(n2_info_content); + if (!n2_info_content_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [n2_info_content]"); + goto end; + } } s_nssai = cJSON_GetObjectItemCaseSensitive(n2_sm_informationJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } home_plmn_snssai = cJSON_GetObjectItemCaseSensitive(n2_sm_informationJSON, "homePlmnSnssai"); if (home_plmn_snssai) { home_plmn_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(home_plmn_snssai); + if (!home_plmn_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [home_plmn_snssai]"); + goto end; + } } iwk_snssai = cJSON_GetObjectItemCaseSensitive(n2_sm_informationJSON, "iwkSnssai"); if (iwk_snssai) { iwk_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(iwk_snssai); + if (!iwk_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [iwk_snssai]"); + goto end; + } } subject_to_ho = cJSON_GetObjectItemCaseSensitive(n2_sm_informationJSON, "subjectToHo"); diff --git a/lib/sbi/openapi/model/n32f_error_info.c b/lib/sbi/openapi/model/n32f_error_info.c index 74da1b62d..fa66781be 100644 --- a/lib/sbi/openapi/model/n32f_error_info.c +++ b/lib/sbi/openapi/model/n32f_error_info.c @@ -187,7 +187,6 @@ OpenAPI_n32f_error_info_t *OpenAPI_n32f_error_info_parseFromJSON(cJSON *n32f_err OpenAPI_failed_modification_info_t *failed_modification_listItem = OpenAPI_failed_modification_info_parseFromJSON(failed_modification_list_local); if (!failed_modification_listItem) { ogs_error("No failed_modification_listItem"); - OpenAPI_list_free(failed_modification_listList); goto end; } OpenAPI_list_add(failed_modification_listList, failed_modification_listItem); @@ -212,7 +211,6 @@ OpenAPI_n32f_error_info_t *OpenAPI_n32f_error_info_parseFromJSON(cJSON *n32f_err OpenAPI_n32f_error_detail_t *error_details_listItem = OpenAPI_n32f_error_detail_parseFromJSON(error_details_list_local); if (!error_details_listItem) { ogs_error("No error_details_listItem"); - OpenAPI_list_free(error_details_listList); goto end; } OpenAPI_list_add(error_details_listList, error_details_listItem); diff --git a/lib/sbi/openapi/model/n3ga_location.c b/lib/sbi/openapi/model/n3ga_location.c index eef20371e..bbfd4e22d 100644 --- a/lib/sbi/openapi/model/n3ga_location.c +++ b/lib/sbi/openapi/model/n3ga_location.c @@ -234,6 +234,10 @@ OpenAPI_n3ga_location_t *OpenAPI_n3ga_location_parseFromJSON(cJSON *n3ga_locatio n3gpp_tai = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "n3gppTai"); if (n3gpp_tai) { n3gpp_tai_local_nonprim = OpenAPI_tai_parseFromJSON(n3gpp_tai); + if (!n3gpp_tai_local_nonprim) { + ogs_error("OpenAPI_tai_parseFromJSON failed [n3gpp_tai]"); + goto end; + } } n3_iwf_id = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "n3IwfId"); @@ -280,16 +284,28 @@ OpenAPI_n3ga_location_t *OpenAPI_n3ga_location_parseFromJSON(cJSON *n3ga_locatio tnap_id = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "tnapId"); if (tnap_id) { tnap_id_local_nonprim = OpenAPI_tnap_id_parseFromJSON(tnap_id); + if (!tnap_id_local_nonprim) { + ogs_error("OpenAPI_tnap_id_parseFromJSON failed [tnap_id]"); + goto end; + } } twap_id = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "twapId"); if (twap_id) { twap_id_local_nonprim = OpenAPI_twap_id_parseFromJSON(twap_id); + if (!twap_id_local_nonprim) { + ogs_error("OpenAPI_twap_id_parseFromJSON failed [twap_id]"); + goto end; + } } hfc_node_id = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "hfcNodeId"); if (hfc_node_id) { hfc_node_id_local_nonprim = OpenAPI_hfc_node_id_parseFromJSON(hfc_node_id); + if (!hfc_node_id_local_nonprim) { + ogs_error("OpenAPI_hfc_node_id_parseFromJSON failed [hfc_node_id]"); + goto end; + } } gli = cJSON_GetObjectItemCaseSensitive(n3ga_locationJSON, "gli"); diff --git a/lib/sbi/openapi/model/n4_information.c b/lib/sbi/openapi/model/n4_information.c index 8c6f41c7c..e381000b9 100644 --- a/lib/sbi/openapi/model/n4_information.c +++ b/lib/sbi/openapi/model/n4_information.c @@ -170,10 +170,18 @@ OpenAPI_n4_information_t *OpenAPI_n4_information_parseFromJSON(cJSON *n4_informa goto end; } n4_message_payload_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n4_message_payload); + if (!n4_message_payload_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n4_message_payload]"); + goto end; + } n4_dnai_info = cJSON_GetObjectItemCaseSensitive(n4_informationJSON, "n4DnaiInfo"); if (n4_dnai_info) { n4_dnai_info_local_nonprim = OpenAPI_dnai_information_parseFromJSON(n4_dnai_info); + if (!n4_dnai_info_local_nonprim) { + ogs_error("OpenAPI_dnai_information_parseFromJSON failed [n4_dnai_info]"); + goto end; + } } psa_upf_id = cJSON_GetObjectItemCaseSensitive(n4_informationJSON, "psaUpfId"); diff --git a/lib/sbi/openapi/model/namf_subscription_data.c b/lib/sbi/openapi/model/namf_subscription_data.c index 91599f0d4..6d6706304 100644 --- a/lib/sbi/openapi/model/namf_subscription_data.c +++ b/lib/sbi/openapi/model/namf_subscription_data.c @@ -114,7 +114,6 @@ OpenAPI_namf_subscription_data_t *OpenAPI_namf_subscription_data_parseFromJSON(c OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); diff --git a/lib/sbi/openapi/model/ncgi.c b/lib/sbi/openapi/model/ncgi.c index fc8fe2b5d..fc2c06771 100644 --- a/lib/sbi/openapi/model/ncgi.c +++ b/lib/sbi/openapi/model/ncgi.c @@ -102,6 +102,10 @@ OpenAPI_ncgi_t *OpenAPI_ncgi_parseFromJSON(cJSON *ncgiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } nr_cell_id = cJSON_GetObjectItemCaseSensitive(ncgiJSON, "nrCellId"); if (!nr_cell_id) { diff --git a/lib/sbi/openapi/model/ncgi_1.c b/lib/sbi/openapi/model/ncgi_1.c index a0e3e6edb..44b4b54b1 100644 --- a/lib/sbi/openapi/model/ncgi_1.c +++ b/lib/sbi/openapi/model/ncgi_1.c @@ -102,6 +102,10 @@ OpenAPI_ncgi_1_t *OpenAPI_ncgi_1_parseFromJSON(cJSON *ncgi_1JSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } nr_cell_id = cJSON_GetObjectItemCaseSensitive(ncgi_1JSON, "nrCellId"); if (!nr_cell_id) { diff --git a/lib/sbi/openapi/model/ncgi_tai.c b/lib/sbi/openapi/model/ncgi_tai.c index 706654b9a..96c1a8edd 100644 --- a/lib/sbi/openapi/model/ncgi_tai.c +++ b/lib/sbi/openapi/model/ncgi_tai.c @@ -101,6 +101,10 @@ OpenAPI_ncgi_tai_t *OpenAPI_ncgi_tai_parseFromJSON(cJSON *ncgi_taiJSON) goto end; } tai_local_nonprim = OpenAPI_tai_parseFromJSON(tai); + if (!tai_local_nonprim) { + ogs_error("OpenAPI_tai_parseFromJSON failed [tai]"); + goto end; + } cell_list = cJSON_GetObjectItemCaseSensitive(ncgi_taiJSON, "cellList"); if (!cell_list) { @@ -123,7 +127,6 @@ OpenAPI_ncgi_tai_t *OpenAPI_ncgi_tai_parseFromJSON(cJSON *ncgi_taiJSON) OpenAPI_ncgi_t *cell_listItem = OpenAPI_ncgi_parseFromJSON(cell_list_local); if (!cell_listItem) { ogs_error("No cell_listItem"); - OpenAPI_list_free(cell_listList); goto end; } OpenAPI_list_add(cell_listList, cell_listItem); diff --git a/lib/sbi/openapi/model/nef_cond.c b/lib/sbi/openapi/model/nef_cond.c index f1c9174a0..1d392378d 100644 --- a/lib/sbi/openapi/model/nef_cond.c +++ b/lib/sbi/openapi/model/nef_cond.c @@ -276,7 +276,6 @@ OpenAPI_nef_cond_t *OpenAPI_nef_cond_parseFromJSON(cJSON *nef_condJSON) OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); @@ -286,6 +285,10 @@ OpenAPI_nef_cond_t *OpenAPI_nef_cond_parseFromJSON(cJSON *nef_condJSON) pfd_data = cJSON_GetObjectItemCaseSensitive(nef_condJSON, "pfdData"); if (pfd_data) { pfd_data_local_nonprim = OpenAPI_pfd_data_parseFromJSON(pfd_data); + if (!pfd_data_local_nonprim) { + ogs_error("OpenAPI_pfd_data_parseFromJSON failed [pfd_data]"); + goto end; + } } gpsi_ranges = cJSON_GetObjectItemCaseSensitive(nef_condJSON, "gpsiRanges"); @@ -306,7 +309,6 @@ OpenAPI_nef_cond_t *OpenAPI_nef_cond_parseFromJSON(cJSON *nef_condJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -331,7 +333,6 @@ OpenAPI_nef_cond_t *OpenAPI_nef_cond_parseFromJSON(cJSON *nef_condJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); diff --git a/lib/sbi/openapi/model/nef_info.c b/lib/sbi/openapi/model/nef_info.c index 66ef3df88..e771eb83a 100644 --- a/lib/sbi/openapi/model/nef_info.c +++ b/lib/sbi/openapi/model/nef_info.c @@ -307,11 +307,19 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) pfd_data = cJSON_GetObjectItemCaseSensitive(nef_infoJSON, "pfdData"); if (pfd_data) { pfd_data_local_nonprim = OpenAPI_pfd_data_parseFromJSON(pfd_data); + if (!pfd_data_local_nonprim) { + ogs_error("OpenAPI_pfd_data_parseFromJSON failed [pfd_data]"); + goto end; + } } af_ee_data = cJSON_GetObjectItemCaseSensitive(nef_infoJSON, "afEeData"); if (af_ee_data) { af_ee_data_local_nonprim = OpenAPI_af_event_exposure_data_parseFromJSON(af_ee_data); + if (!af_ee_data_local_nonprim) { + ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON failed [af_ee_data]"); + goto end; + } } gpsi_ranges = cJSON_GetObjectItemCaseSensitive(nef_infoJSON, "gpsiRanges"); @@ -332,7 +340,6 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -357,7 +364,6 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -403,7 +409,6 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -428,7 +433,6 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -474,7 +478,6 @@ OpenAPI_nef_info_t *OpenAPI_nef_info_parseFromJSON(cJSON *nef_infoJSON) OpenAPI_un_trust_af_info_t *un_trust_af_info_listItem = OpenAPI_un_trust_af_info_parseFromJSON(un_trust_af_info_list_local); if (!un_trust_af_info_listItem) { ogs_error("No un_trust_af_info_listItem"); - OpenAPI_list_free(un_trust_af_info_listList); goto end; } OpenAPI_list_add(un_trust_af_info_listList, un_trust_af_info_listItem); diff --git a/lib/sbi/openapi/model/network_area_info.c b/lib/sbi/openapi/model/network_area_info.c index 65d903504..24839b4fd 100644 --- a/lib/sbi/openapi/model/network_area_info.c +++ b/lib/sbi/openapi/model/network_area_info.c @@ -169,7 +169,6 @@ OpenAPI_network_area_info_t *OpenAPI_network_area_info_parseFromJSON(cJSON *netw OpenAPI_ecgi_t *ecgisItem = OpenAPI_ecgi_parseFromJSON(ecgis_local); if (!ecgisItem) { ogs_error("No ecgisItem"); - OpenAPI_list_free(ecgisList); goto end; } OpenAPI_list_add(ecgisList, ecgisItem); @@ -194,7 +193,6 @@ OpenAPI_network_area_info_t *OpenAPI_network_area_info_parseFromJSON(cJSON *netw OpenAPI_ncgi_t *ncgisItem = OpenAPI_ncgi_parseFromJSON(ncgis_local); if (!ncgisItem) { ogs_error("No ncgisItem"); - OpenAPI_list_free(ncgisList); goto end; } OpenAPI_list_add(ncgisList, ncgisItem); @@ -219,7 +217,6 @@ OpenAPI_network_area_info_t *OpenAPI_network_area_info_parseFromJSON(cJSON *netw OpenAPI_global_ran_node_id_t *g_ran_node_idsItem = OpenAPI_global_ran_node_id_parseFromJSON(g_ran_node_ids_local); if (!g_ran_node_idsItem) { ogs_error("No g_ran_node_idsItem"); - OpenAPI_list_free(g_ran_node_idsList); goto end; } OpenAPI_list_add(g_ran_node_idsList, g_ran_node_idsItem); @@ -244,7 +241,6 @@ OpenAPI_network_area_info_t *OpenAPI_network_area_info_parseFromJSON(cJSON *netw OpenAPI_tai_t *taisItem = OpenAPI_tai_parseFromJSON(tais_local); if (!taisItem) { ogs_error("No taisItem"); - OpenAPI_list_free(taisList); goto end; } OpenAPI_list_add(taisList, taisItem); diff --git a/lib/sbi/openapi/model/network_area_info_1.c b/lib/sbi/openapi/model/network_area_info_1.c index f4cbd3604..e47f95cc1 100644 --- a/lib/sbi/openapi/model/network_area_info_1.c +++ b/lib/sbi/openapi/model/network_area_info_1.c @@ -169,7 +169,6 @@ OpenAPI_network_area_info_1_t *OpenAPI_network_area_info_1_parseFromJSON(cJSON * OpenAPI_ecgi_t *ecgisItem = OpenAPI_ecgi_parseFromJSON(ecgis_local); if (!ecgisItem) { ogs_error("No ecgisItem"); - OpenAPI_list_free(ecgisList); goto end; } OpenAPI_list_add(ecgisList, ecgisItem); @@ -194,7 +193,6 @@ OpenAPI_network_area_info_1_t *OpenAPI_network_area_info_1_parseFromJSON(cJSON * OpenAPI_ncgi_t *ncgisItem = OpenAPI_ncgi_parseFromJSON(ncgis_local); if (!ncgisItem) { ogs_error("No ncgisItem"); - OpenAPI_list_free(ncgisList); goto end; } OpenAPI_list_add(ncgisList, ncgisItem); @@ -219,7 +217,6 @@ OpenAPI_network_area_info_1_t *OpenAPI_network_area_info_1_parseFromJSON(cJSON * OpenAPI_global_ran_node_id_t *g_ran_node_idsItem = OpenAPI_global_ran_node_id_parseFromJSON(g_ran_node_ids_local); if (!g_ran_node_idsItem) { ogs_error("No g_ran_node_idsItem"); - OpenAPI_list_free(g_ran_node_idsList); goto end; } OpenAPI_list_add(g_ran_node_idsList, g_ran_node_idsItem); @@ -244,7 +241,6 @@ OpenAPI_network_area_info_1_t *OpenAPI_network_area_info_1_parseFromJSON(cJSON * OpenAPI_tai_t *taisItem = OpenAPI_tai_parseFromJSON(tais_local); if (!taisItem) { ogs_error("No taisItem"); - OpenAPI_list_free(taisList); goto end; } OpenAPI_list_add(taisList, taisItem); diff --git a/lib/sbi/openapi/model/network_area_info_2.c b/lib/sbi/openapi/model/network_area_info_2.c index 9f09c2945..3976b0656 100644 --- a/lib/sbi/openapi/model/network_area_info_2.c +++ b/lib/sbi/openapi/model/network_area_info_2.c @@ -169,7 +169,6 @@ OpenAPI_network_area_info_2_t *OpenAPI_network_area_info_2_parseFromJSON(cJSON * OpenAPI_ecgi_1_t *ecgisItem = OpenAPI_ecgi_1_parseFromJSON(ecgis_local); if (!ecgisItem) { ogs_error("No ecgisItem"); - OpenAPI_list_free(ecgisList); goto end; } OpenAPI_list_add(ecgisList, ecgisItem); @@ -194,7 +193,6 @@ OpenAPI_network_area_info_2_t *OpenAPI_network_area_info_2_parseFromJSON(cJSON * OpenAPI_ncgi_1_t *ncgisItem = OpenAPI_ncgi_1_parseFromJSON(ncgis_local); if (!ncgisItem) { ogs_error("No ncgisItem"); - OpenAPI_list_free(ncgisList); goto end; } OpenAPI_list_add(ncgisList, ncgisItem); @@ -219,7 +217,6 @@ OpenAPI_network_area_info_2_t *OpenAPI_network_area_info_2_parseFromJSON(cJSON * OpenAPI_global_ran_node_id_1_t *g_ran_node_idsItem = OpenAPI_global_ran_node_id_1_parseFromJSON(g_ran_node_ids_local); if (!g_ran_node_idsItem) { ogs_error("No g_ran_node_idsItem"); - OpenAPI_list_free(g_ran_node_idsList); goto end; } OpenAPI_list_add(g_ran_node_idsList, g_ran_node_idsItem); @@ -244,7 +241,6 @@ OpenAPI_network_area_info_2_t *OpenAPI_network_area_info_2_parseFromJSON(cJSON * OpenAPI_tai_1_t *taisItem = OpenAPI_tai_1_parseFromJSON(tais_local); if (!taisItem) { ogs_error("No taisItem"); - OpenAPI_list_free(taisList); goto end; } OpenAPI_list_add(taisList, taisItem); diff --git a/lib/sbi/openapi/model/network_perf_info.c b/lib/sbi/openapi/model/network_perf_info.c index 3c29b402e..3a4d2c36e 100644 --- a/lib/sbi/openapi/model/network_perf_info.c +++ b/lib/sbi/openapi/model/network_perf_info.c @@ -124,11 +124,19 @@ OpenAPI_network_perf_info_t *OpenAPI_network_perf_info_parseFromJSON(cJSON *netw network_area = cJSON_GetObjectItemCaseSensitive(network_perf_infoJSON, "networkArea"); if (network_area) { network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } } nw_perf_type = cJSON_GetObjectItemCaseSensitive(network_perf_infoJSON, "nwPerfType"); if (nw_perf_type) { nw_perf_type_local_nonprim = OpenAPI_network_perf_type_parseFromJSON(nw_perf_type); + if (!nw_perf_type_local_nonprim) { + ogs_error("OpenAPI_network_perf_type_parseFromJSON failed [nw_perf_type]"); + goto end; + } } relative_ratio = cJSON_GetObjectItemCaseSensitive(network_perf_infoJSON, "relativeRatio"); diff --git a/lib/sbi/openapi/model/network_perf_requirement.c b/lib/sbi/openapi/model/network_perf_requirement.c index 374685d9b..94e85f019 100644 --- a/lib/sbi/openapi/model/network_perf_requirement.c +++ b/lib/sbi/openapi/model/network_perf_requirement.c @@ -96,6 +96,10 @@ OpenAPI_network_perf_requirement_t *OpenAPI_network_perf_requirement_parseFromJS goto end; } nw_perf_type_local_nonprim = OpenAPI_network_perf_type_parseFromJSON(nw_perf_type); + if (!nw_perf_type_local_nonprim) { + ogs_error("OpenAPI_network_perf_type_parseFromJSON failed [nw_perf_type]"); + goto end; + } relative_ratio = cJSON_GetObjectItemCaseSensitive(network_perf_requirementJSON, "relativeRatio"); if (relative_ratio) { diff --git a/lib/sbi/openapi/model/network_slice_cond.c b/lib/sbi/openapi/model/network_slice_cond.c index af234d2c3..c72b7ef7b 100644 --- a/lib/sbi/openapi/model/network_slice_cond.c +++ b/lib/sbi/openapi/model/network_slice_cond.c @@ -118,7 +118,6 @@ OpenAPI_network_slice_cond_t *OpenAPI_network_slice_cond_parseFromJSON(cJSON *ne OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); diff --git a/lib/sbi/openapi/model/nf_instance_info.c b/lib/sbi/openapi/model/nf_instance_info.c index 7dc829799..d435b8adc 100644 --- a/lib/sbi/openapi/model/nf_instance_info.c +++ b/lib/sbi/openapi/model/nf_instance_info.c @@ -121,6 +121,10 @@ OpenAPI_nf_instance_info_t *OpenAPI_nf_instance_info_parseFromJSON(cJSON *nf_ins preferred_search = cJSON_GetObjectItemCaseSensitive(nf_instance_infoJSON, "preferredSearch"); if (preferred_search) { preferred_search_local_nonprim = OpenAPI_preferred_search_parseFromJSON(preferred_search); + if (!preferred_search_local_nonprim) { + ogs_error("OpenAPI_preferred_search_parseFromJSON failed [preferred_search]"); + goto end; + } } nrf_altered_priorities = cJSON_GetObjectItemCaseSensitive(nf_instance_infoJSON, "nrfAlteredPriorities"); diff --git a/lib/sbi/openapi/model/nf_load_level_information.c b/lib/sbi/openapi/model/nf_load_level_information.c index 04b9b1510..4ed7e15f3 100644 --- a/lib/sbi/openapi/model/nf_load_level_information.c +++ b/lib/sbi/openapi/model/nf_load_level_information.c @@ -236,6 +236,10 @@ OpenAPI_nf_load_level_information_t *OpenAPI_nf_load_level_information_parseFrom nf_status = cJSON_GetObjectItemCaseSensitive(nf_load_level_informationJSON, "nfStatus"); if (nf_status) { nf_status_local_nonprim = OpenAPI_nnwdaf_nf_status_parseFromJSON(nf_status); + if (!nf_status_local_nonprim) { + ogs_error("OpenAPI_nnwdaf_nf_status_parseFromJSON failed [nf_status]"); + goto end; + } } nf_cpu_usage = cJSON_GetObjectItemCaseSensitive(nf_load_level_informationJSON, "nfCpuUsage"); @@ -289,6 +293,10 @@ OpenAPI_nf_load_level_information_t *OpenAPI_nf_load_level_information_parseFrom snssai = cJSON_GetObjectItemCaseSensitive(nf_load_level_informationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } confidence = cJSON_GetObjectItemCaseSensitive(nf_load_level_informationJSON, "confidence"); diff --git a/lib/sbi/openapi/model/nf_profile.c b/lib/sbi/openapi/model/nf_profile.c index 74e5639e7..d980877a5 100644 --- a/lib/sbi/openapi/model/nf_profile.c +++ b/lib/sbi/openapi/model/nf_profile.c @@ -2178,7 +2178,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_collocated_nf_instance_t *collocated_nf_instancesItem = OpenAPI_collocated_nf_instance_parseFromJSON(collocated_nf_instances_local); if (!collocated_nf_instancesItem) { ogs_error("No collocated_nf_instancesItem"); - OpenAPI_list_free(collocated_nf_instancesList); goto end; } OpenAPI_list_add(collocated_nf_instancesList, collocated_nf_instancesItem); @@ -2211,7 +2210,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_plmn_id_t *plmn_listItem = OpenAPI_plmn_id_parseFromJSON(plmn_list_local); if (!plmn_listItem) { ogs_error("No plmn_listItem"); - OpenAPI_list_free(plmn_listList); goto end; } OpenAPI_list_add(plmn_listList, plmn_listItem); @@ -2236,7 +2234,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_plmn_id_nid_t *snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(snpn_list_local); if (!snpn_listItem) { ogs_error("No snpn_listItem"); - OpenAPI_list_free(snpn_listList); goto end; } OpenAPI_list_add(snpn_listList, snpn_listItem); @@ -2261,7 +2258,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_ext_snssai_t *s_nssaisItem = OpenAPI_ext_snssai_parseFromJSON(s_nssais_local); if (!s_nssaisItem) { ogs_error("No s_nssaisItem"); - OpenAPI_list_free(s_nssaisList); goto end; } OpenAPI_list_add(s_nssaisList, s_nssaisItem); @@ -2286,7 +2282,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_plmn_snssai_t *per_plmn_snssai_listItem = OpenAPI_plmn_snssai_parseFromJSON(per_plmn_snssai_list_local); if (!per_plmn_snssai_listItem) { ogs_error("No per_plmn_snssai_listItem"); - OpenAPI_list_free(per_plmn_snssai_listList); goto end; } OpenAPI_list_add(per_plmn_snssai_listList, per_plmn_snssai_listItem); @@ -2390,7 +2385,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_plmn_id_t *allowed_plmnsItem = OpenAPI_plmn_id_parseFromJSON(allowed_plmns_local); if (!allowed_plmnsItem) { ogs_error("No allowed_plmnsItem"); - OpenAPI_list_free(allowed_plmnsList); goto end; } OpenAPI_list_add(allowed_plmnsList, allowed_plmnsItem); @@ -2415,7 +2409,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_plmn_id_nid_t *allowed_snpnsItem = OpenAPI_plmn_id_nid_parseFromJSON(allowed_snpns_local); if (!allowed_snpnsItem) { ogs_error("No allowed_snpnsItem"); - OpenAPI_list_free(allowed_snpnsList); goto end; } OpenAPI_list_add(allowed_snpnsList, allowed_snpnsItem); @@ -2480,7 +2473,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_ext_snssai_t *allowed_nssaisItem = OpenAPI_ext_snssai_parseFromJSON(allowed_nssais_local); if (!allowed_nssaisItem) { ogs_error("No allowed_nssaisItem"); - OpenAPI_list_free(allowed_nssaisList); goto end; } OpenAPI_list_add(allowed_nssaisList, allowed_nssaisItem); @@ -2530,6 +2522,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) udr_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udrInfo"); if (udr_info) { udr_info_local_nonprim = OpenAPI_udr_info_parseFromJSON(udr_info); + if (!udr_info_local_nonprim) { + ogs_error("OpenAPI_udr_info_parseFromJSON failed [udr_info]"); + goto end; + } } udr_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udrInfoList"); @@ -2561,6 +2557,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) udm_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udmInfo"); if (udm_info) { udm_info_local_nonprim = OpenAPI_udm_info_parseFromJSON(udm_info); + if (!udm_info_local_nonprim) { + ogs_error("OpenAPI_udm_info_parseFromJSON failed [udm_info]"); + goto end; + } } udm_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udmInfoList"); @@ -2592,6 +2592,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) ausf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "ausfInfo"); if (ausf_info) { ausf_info_local_nonprim = OpenAPI_ausf_info_parseFromJSON(ausf_info); + if (!ausf_info_local_nonprim) { + ogs_error("OpenAPI_ausf_info_parseFromJSON failed [ausf_info]"); + goto end; + } } ausf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "ausfInfoList"); @@ -2623,6 +2627,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) amf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "amfInfo"); if (amf_info) { amf_info_local_nonprim = OpenAPI_amf_info_parseFromJSON(amf_info); + if (!amf_info_local_nonprim) { + ogs_error("OpenAPI_amf_info_parseFromJSON failed [amf_info]"); + goto end; + } } amf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "amfInfoList"); @@ -2654,6 +2662,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) smf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "smfInfo"); if (smf_info) { smf_info_local_nonprim = OpenAPI_smf_info_parseFromJSON(smf_info); + if (!smf_info_local_nonprim) { + ogs_error("OpenAPI_smf_info_parseFromJSON failed [smf_info]"); + goto end; + } } smf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "smfInfoList"); @@ -2685,6 +2697,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) upf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "upfInfo"); if (upf_info) { upf_info_local_nonprim = OpenAPI_upf_info_parseFromJSON(upf_info); + if (!upf_info_local_nonprim) { + ogs_error("OpenAPI_upf_info_parseFromJSON failed [upf_info]"); + goto end; + } } upf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "upfInfoList"); @@ -2716,6 +2732,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) pcf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "pcfInfo"); if (pcf_info) { pcf_info_local_nonprim = OpenAPI_pcf_info_parseFromJSON(pcf_info); + if (!pcf_info_local_nonprim) { + ogs_error("OpenAPI_pcf_info_parseFromJSON failed [pcf_info]"); + goto end; + } } pcf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "pcfInfoList"); @@ -2747,6 +2767,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) bsf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "bsfInfo"); if (bsf_info) { bsf_info_local_nonprim = OpenAPI_bsf_info_parseFromJSON(bsf_info); + if (!bsf_info_local_nonprim) { + ogs_error("OpenAPI_bsf_info_parseFromJSON failed [bsf_info]"); + goto end; + } } bsf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "bsfInfoList"); @@ -2778,6 +2802,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) chf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "chfInfo"); if (chf_info) { chf_info_local_nonprim = OpenAPI_chf_info_parseFromJSON(chf_info); + if (!chf_info_local_nonprim) { + ogs_error("OpenAPI_chf_info_parseFromJSON failed [chf_info]"); + goto end; + } } chf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "chfInfoList"); @@ -2809,16 +2837,28 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) nef_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nefInfo"); if (nef_info) { nef_info_local_nonprim = OpenAPI_nef_info_parseFromJSON(nef_info); + if (!nef_info_local_nonprim) { + ogs_error("OpenAPI_nef_info_parseFromJSON failed [nef_info]"); + goto end; + } } nrf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nrfInfo"); if (nrf_info) { nrf_info_local_nonprim = OpenAPI_nrf_info_parseFromJSON(nrf_info); + if (!nrf_info_local_nonprim) { + ogs_error("OpenAPI_nrf_info_parseFromJSON failed [nrf_info]"); + goto end; + } } udsf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udsfInfo"); if (udsf_info) { udsf_info_local_nonprim = OpenAPI_udsf_info_parseFromJSON(udsf_info); + if (!udsf_info_local_nonprim) { + ogs_error("OpenAPI_udsf_info_parseFromJSON failed [udsf_info]"); + goto end; + } } udsf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "udsfInfoList"); @@ -2850,6 +2890,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) nwdaf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nwdafInfo"); if (nwdaf_info) { nwdaf_info_local_nonprim = OpenAPI_nwdaf_info_parseFromJSON(nwdaf_info); + if (!nwdaf_info_local_nonprim) { + ogs_error("OpenAPI_nwdaf_info_parseFromJSON failed [nwdaf_info]"); + goto end; + } } nwdaf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nwdafInfoList"); @@ -2973,7 +3017,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_nf_service_t *nf_servicesItem = OpenAPI_nf_service_parseFromJSON(nf_services_local); if (!nf_servicesItem) { ogs_error("No nf_servicesItem"); - OpenAPI_list_free(nf_servicesList); goto end; } OpenAPI_list_add(nf_servicesList, nf_servicesItem); @@ -3040,7 +3083,6 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) OpenAPI_default_notification_subscription_t *default_notification_subscriptionsItem = OpenAPI_default_notification_subscription_parseFromJSON(default_notification_subscriptions_local); if (!default_notification_subscriptionsItem) { ogs_error("No default_notification_subscriptionsItem"); - OpenAPI_list_free(default_notification_subscriptionsList); goto end; } OpenAPI_list_add(default_notification_subscriptionsList, default_notification_subscriptionsItem); @@ -3050,11 +3092,19 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) lmf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "lmfInfo"); if (lmf_info) { lmf_info_local_nonprim = OpenAPI_lmf_info_parseFromJSON(lmf_info); + if (!lmf_info_local_nonprim) { + ogs_error("OpenAPI_lmf_info_parseFromJSON failed [lmf_info]"); + goto end; + } } gmlc_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "gmlcInfo"); if (gmlc_info) { gmlc_info_local_nonprim = OpenAPI_gmlc_info_parseFromJSON(gmlc_info); + if (!gmlc_info_local_nonprim) { + ogs_error("OpenAPI_gmlc_info_parseFromJSON failed [gmlc_info]"); + goto end; + } } nf_set_id_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nfSetIdList"); @@ -3177,11 +3227,19 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) scp_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "scpInfo"); if (scp_info) { scp_info_local_nonprim = OpenAPI_scp_info_parseFromJSON(scp_info); + if (!scp_info_local_nonprim) { + ogs_error("OpenAPI_scp_info_parseFromJSON failed [scp_info]"); + goto end; + } } sepp_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "seppInfo"); if (sepp_info) { sepp_info_local_nonprim = OpenAPI_sepp_info_parseFromJSON(sepp_info); + if (!sepp_info_local_nonprim) { + ogs_error("OpenAPI_sepp_info_parseFromJSON failed [sepp_info]"); + goto end; + } } vendor_id = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "vendorId"); @@ -3249,11 +3307,19 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) _5g_ddnmf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "5gDdnmfInfo"); if (_5g_ddnmf_info) { _5g_ddnmf_info_local_nonprim = OpenAPI_model_5_g_ddnmf_info_parseFromJSON(_5g_ddnmf_info); + if (!_5g_ddnmf_info_local_nonprim) { + ogs_error("OpenAPI_model_5_g_ddnmf_info_parseFromJSON failed [_5g_ddnmf_info]"); + goto end; + } } mfaf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "mfafInfo"); if (mfaf_info) { mfaf_info_local_nonprim = OpenAPI_mfaf_info_parseFromJSON(mfaf_info); + if (!mfaf_info_local_nonprim) { + ogs_error("OpenAPI_mfaf_info_parseFromJSON failed [mfaf_info]"); + goto end; + } } easdf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "easdfInfoList"); @@ -3285,6 +3351,10 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) dccf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "dccfInfo"); if (dccf_info) { dccf_info_local_nonprim = OpenAPI_dccf_info_parseFromJSON(dccf_info); + if (!dccf_info_local_nonprim) { + ogs_error("OpenAPI_dccf_info_parseFromJSON failed [dccf_info]"); + goto end; + } } nsacf_info_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nsacfInfoList"); @@ -3394,11 +3464,19 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) trust_af_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "trustAfInfo"); if (trust_af_info) { trust_af_info_local_nonprim = OpenAPI_trust_af_info_parseFromJSON(trust_af_info); + if (!trust_af_info_local_nonprim) { + ogs_error("OpenAPI_trust_af_info_parseFromJSON failed [trust_af_info]"); + goto end; + } } nssaaf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "nssaafInfo"); if (nssaaf_info) { nssaaf_info_local_nonprim = OpenAPI_nssaaf_info_parseFromJSON(nssaaf_info); + if (!nssaaf_info_local_nonprim) { + ogs_error("OpenAPI_nssaaf_info_parseFromJSON failed [nssaaf_info]"); + goto end; + } } hni_list = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "hniList"); @@ -3425,11 +3503,19 @@ OpenAPI_nf_profile_t *OpenAPI_nf_profile_parseFromJSON(cJSON *nf_profileJSON) iwmsc_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "iwmscInfo"); if (iwmsc_info) { iwmsc_info_local_nonprim = OpenAPI_iwmsc_info_parseFromJSON(iwmsc_info); + if (!iwmsc_info_local_nonprim) { + ogs_error("OpenAPI_iwmsc_info_parseFromJSON failed [iwmsc_info]"); + goto end; + } } mnpf_info = cJSON_GetObjectItemCaseSensitive(nf_profileJSON, "mnpfInfo"); if (mnpf_info) { mnpf_info_local_nonprim = OpenAPI_mnpf_info_parseFromJSON(mnpf_info); + if (!mnpf_info_local_nonprim) { + ogs_error("OpenAPI_mnpf_info_parseFromJSON failed [mnpf_info]"); + goto end; + } } nf_profile_local_var = OpenAPI_nf_profile_create ( diff --git a/lib/sbi/openapi/model/nf_service.c b/lib/sbi/openapi/model/nf_service.c index 1ddf3c1e1..5941c8441 100644 --- a/lib/sbi/openapi/model/nf_service.c +++ b/lib/sbi/openapi/model/nf_service.c @@ -691,7 +691,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_nf_service_version_t *versionsItem = OpenAPI_nf_service_version_parseFromJSON(versions_local); if (!versionsItem) { ogs_error("No versionsItem"); - OpenAPI_list_free(versionsList); goto end; } OpenAPI_list_add(versionsList, versionsItem); @@ -753,7 +752,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_ip_end_point_t *ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(ip_end_points_local); if (!ip_end_pointsItem) { ogs_error("No ip_end_pointsItem"); - OpenAPI_list_free(ip_end_pointsList); goto end; } OpenAPI_list_add(ip_end_pointsList, ip_end_pointsItem); @@ -786,7 +784,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_default_notification_subscription_t *default_notification_subscriptionsItem = OpenAPI_default_notification_subscription_parseFromJSON(default_notification_subscriptions_local); if (!default_notification_subscriptionsItem) { ogs_error("No default_notification_subscriptionsItem"); - OpenAPI_list_free(default_notification_subscriptionsList); goto end; } OpenAPI_list_add(default_notification_subscriptionsList, default_notification_subscriptionsItem); @@ -811,7 +808,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_plmn_id_t *allowed_plmnsItem = OpenAPI_plmn_id_parseFromJSON(allowed_plmns_local); if (!allowed_plmnsItem) { ogs_error("No allowed_plmnsItem"); - OpenAPI_list_free(allowed_plmnsList); goto end; } OpenAPI_list_add(allowed_plmnsList, allowed_plmnsItem); @@ -836,7 +832,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_plmn_id_nid_t *allowed_snpnsItem = OpenAPI_plmn_id_nid_parseFromJSON(allowed_snpns_local); if (!allowed_snpnsItem) { ogs_error("No allowed_snpnsItem"); - OpenAPI_list_free(allowed_snpnsList); goto end; } OpenAPI_list_add(allowed_snpnsList, allowed_snpnsItem); @@ -901,7 +896,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_ext_snssai_t *allowed_nssaisItem = OpenAPI_ext_snssai_parseFromJSON(allowed_nssais_local); if (!allowed_nssaisItem) { ogs_error("No allowed_nssaisItem"); - OpenAPI_list_free(allowed_nssaisList); goto end; } OpenAPI_list_add(allowed_nssaisList, allowed_nssaisItem); @@ -1033,7 +1027,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_ext_snssai_t *s_nssaisItem = OpenAPI_ext_snssai_parseFromJSON(s_nssais_local); if (!s_nssaisItem) { ogs_error("No s_nssaisItem"); - OpenAPI_list_free(s_nssaisList); goto end; } OpenAPI_list_add(s_nssaisList, s_nssaisItem); @@ -1058,7 +1051,6 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) OpenAPI_plmn_snssai_t *per_plmn_snssai_listItem = OpenAPI_plmn_snssai_parseFromJSON(per_plmn_snssai_list_local); if (!per_plmn_snssai_listItem) { ogs_error("No per_plmn_snssai_listItem"); - OpenAPI_list_free(per_plmn_snssai_listList); goto end; } OpenAPI_list_add(per_plmn_snssai_listList, per_plmn_snssai_listItem); @@ -1112,6 +1104,10 @@ OpenAPI_nf_service_t *OpenAPI_nf_service_parseFromJSON(cJSON *nf_serviceJSON) per_plmn_oauth2_req_list = cJSON_GetObjectItemCaseSensitive(nf_serviceJSON, "perPlmnOauth2ReqList"); if (per_plmn_oauth2_req_list) { per_plmn_oauth2_req_list_local_nonprim = OpenAPI_plmn_oauth2_parseFromJSON(per_plmn_oauth2_req_list); + if (!per_plmn_oauth2_req_list_local_nonprim) { + ogs_error("OpenAPI_plmn_oauth2_parseFromJSON failed [per_plmn_oauth2_req_list]"); + goto end; + } } nf_service_local_var = OpenAPI_nf_service_create ( diff --git a/lib/sbi/openapi/model/ng_ran_target_id.c b/lib/sbi/openapi/model/ng_ran_target_id.c index 2c2b0627c..f3cf4036d 100644 --- a/lib/sbi/openapi/model/ng_ran_target_id.c +++ b/lib/sbi/openapi/model/ng_ran_target_id.c @@ -95,6 +95,10 @@ OpenAPI_ng_ran_target_id_t *OpenAPI_ng_ran_target_id_parseFromJSON(cJSON *ng_ran goto end; } ran_node_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(ran_node_id); + if (!ran_node_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [ran_node_id]"); + goto end; + } tai = cJSON_GetObjectItemCaseSensitive(ng_ran_target_idJSON, "tai"); if (!tai) { @@ -102,6 +106,10 @@ OpenAPI_ng_ran_target_id_t *OpenAPI_ng_ran_target_id_parseFromJSON(cJSON *ng_ran goto end; } tai_local_nonprim = OpenAPI_tai_parseFromJSON(tai); + if (!tai_local_nonprim) { + ogs_error("OpenAPI_tai_parseFromJSON failed [tai]"); + goto end; + } ng_ran_target_id_local_var = OpenAPI_ng_ran_target_id_create ( ran_node_id_local_nonprim, diff --git a/lib/sbi/openapi/model/nidd_authorization_info.c b/lib/sbi/openapi/model/nidd_authorization_info.c index dd4bdaa13..784fe3816 100644 --- a/lib/sbi/openapi/model/nidd_authorization_info.c +++ b/lib/sbi/openapi/model/nidd_authorization_info.c @@ -93,7 +93,6 @@ OpenAPI_nidd_authorization_info_t *OpenAPI_nidd_authorization_info_parseFromJSON OpenAPI_authorization_info_t *nidd_authorization_listItem = OpenAPI_authorization_info_parseFromJSON(nidd_authorization_list_local); if (!nidd_authorization_listItem) { ogs_error("No nidd_authorization_listItem"); - OpenAPI_list_free(nidd_authorization_listList); goto end; } OpenAPI_list_add(nidd_authorization_listList, nidd_authorization_listItem); diff --git a/lib/sbi/openapi/model/nnwdaf_events_subscription.c b/lib/sbi/openapi/model/nnwdaf_events_subscription.c index a235a13b2..f00212b6c 100644 --- a/lib/sbi/openapi/model/nnwdaf_events_subscription.c +++ b/lib/sbi/openapi/model/nnwdaf_events_subscription.c @@ -252,7 +252,6 @@ OpenAPI_nnwdaf_events_subscription_t *OpenAPI_nnwdaf_events_subscription_parseFr OpenAPI_event_subscription_t *event_subscriptionsItem = OpenAPI_event_subscription_parseFromJSON(event_subscriptions_local); if (!event_subscriptionsItem) { ogs_error("No event_subscriptionsItem"); - OpenAPI_list_free(event_subscriptionsList); goto end; } OpenAPI_list_add(event_subscriptionsList, event_subscriptionsItem); @@ -261,6 +260,10 @@ OpenAPI_nnwdaf_events_subscription_t *OpenAPI_nnwdaf_events_subscription_parseFr evt_req = cJSON_GetObjectItemCaseSensitive(nnwdaf_events_subscriptionJSON, "evtReq"); if (evt_req) { evt_req_local_nonprim = OpenAPI_reporting_information_parseFromJSON(evt_req); + if (!evt_req_local_nonprim) { + ogs_error("OpenAPI_reporting_information_parseFromJSON failed [evt_req]"); + goto end; + } } notification_uri = cJSON_GetObjectItemCaseSensitive(nnwdaf_events_subscriptionJSON, "notificationURI"); @@ -305,7 +308,6 @@ OpenAPI_nnwdaf_events_subscription_t *OpenAPI_nnwdaf_events_subscription_parseFr OpenAPI_event_notification_t *event_notificationsItem = OpenAPI_event_notification_parseFromJSON(event_notifications_local); if (!event_notificationsItem) { ogs_error("No event_notificationsItem"); - OpenAPI_list_free(event_notificationsList); goto end; } OpenAPI_list_add(event_notificationsList, event_notificationsItem); @@ -330,7 +332,6 @@ OpenAPI_nnwdaf_events_subscription_t *OpenAPI_nnwdaf_events_subscription_parseFr OpenAPI_failure_event_info_t *fail_event_reportsItem = OpenAPI_failure_event_info_parseFromJSON(fail_event_reports_local); if (!fail_event_reportsItem) { ogs_error("No fail_event_reportsItem"); - OpenAPI_list_free(fail_event_reportsList); goto end; } OpenAPI_list_add(fail_event_reportsList, fail_event_reportsItem); @@ -340,11 +341,19 @@ OpenAPI_nnwdaf_events_subscription_t *OpenAPI_nnwdaf_events_subscription_parseFr prev_sub = cJSON_GetObjectItemCaseSensitive(nnwdaf_events_subscriptionJSON, "prevSub"); if (prev_sub) { prev_sub_local_nonprim = OpenAPI_prev_sub_info_parseFromJSON(prev_sub); + if (!prev_sub_local_nonprim) { + ogs_error("OpenAPI_prev_sub_info_parseFromJSON failed [prev_sub]"); + goto end; + } } cons_nf_info = cJSON_GetObjectItemCaseSensitive(nnwdaf_events_subscriptionJSON, "consNfInfo"); if (cons_nf_info) { cons_nf_info_local_nonprim = OpenAPI_consumer_nf_information_parseFromJSON(cons_nf_info); + if (!cons_nf_info_local_nonprim) { + ogs_error("OpenAPI_consumer_nf_information_parseFromJSON failed [cons_nf_info]"); + goto end; + } } nnwdaf_events_subscription_local_var = OpenAPI_nnwdaf_events_subscription_create ( diff --git a/lib/sbi/openapi/model/no_profile_match_info.c b/lib/sbi/openapi/model/no_profile_match_info.c index c9c273e25..e8d73dd37 100644 --- a/lib/sbi/openapi/model/no_profile_match_info.c +++ b/lib/sbi/openapi/model/no_profile_match_info.c @@ -99,6 +99,10 @@ OpenAPI_no_profile_match_info_t *OpenAPI_no_profile_match_info_parseFromJSON(cJS goto end; } reason_local_nonprim = OpenAPI_no_profile_match_reason_parseFromJSON(reason); + if (!reason_local_nonprim) { + ogs_error("OpenAPI_no_profile_match_reason_parseFromJSON failed [reason]"); + goto end; + } query_param_combination_list = cJSON_GetObjectItemCaseSensitive(no_profile_match_infoJSON, "queryParamCombinationList"); if (query_param_combination_list) { @@ -118,7 +122,6 @@ OpenAPI_no_profile_match_info_t *OpenAPI_no_profile_match_info_parseFromJSON(cJS OpenAPI_query_param_combination_t *query_param_combination_listItem = OpenAPI_query_param_combination_parseFromJSON(query_param_combination_list_local); if (!query_param_combination_listItem) { ogs_error("No query_param_combination_listItem"); - OpenAPI_list_free(query_param_combination_listList); goto end; } OpenAPI_list_add(query_param_combination_listList, query_param_combination_listItem); diff --git a/lib/sbi/openapi/model/non_ue_n2_info_notify_request.c b/lib/sbi/openapi/model/non_ue_n2_info_notify_request.c index d8e908702..c61c5db7d 100644 --- a/lib/sbi/openapi/model/non_ue_n2_info_notify_request.c +++ b/lib/sbi/openapi/model/non_ue_n2_info_notify_request.c @@ -84,6 +84,10 @@ OpenAPI_non_ue_n2_info_notify_request_t *OpenAPI_non_ue_n2_info_notify_request_p json_data = cJSON_GetObjectItemCaseSensitive(non_ue_n2_info_notify_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_n2_information_notification_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_n2_information_notification_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(non_ue_n2_info_notify_requestJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/non_ue_n2_info_subscription_create_data.c b/lib/sbi/openapi/model/non_ue_n2_info_subscription_create_data.c index 45b60bb8d..90b03ca35 100644 --- a/lib/sbi/openapi/model/non_ue_n2_info_subscription_create_data.c +++ b/lib/sbi/openapi/model/non_ue_n2_info_subscription_create_data.c @@ -167,7 +167,6 @@ OpenAPI_non_ue_n2_info_subscription_create_data_t *OpenAPI_non_ue_n2_info_subscr OpenAPI_global_ran_node_id_t *global_ran_node_listItem = OpenAPI_global_ran_node_id_parseFromJSON(global_ran_node_list_local); if (!global_ran_node_listItem) { ogs_error("No global_ran_node_listItem"); - OpenAPI_list_free(global_ran_node_listList); goto end; } OpenAPI_list_add(global_ran_node_listList, global_ran_node_listItem); diff --git a/lib/sbi/openapi/model/non_ue_n2_message_transfer_request.c b/lib/sbi/openapi/model/non_ue_n2_message_transfer_request.c index 1e1e1109e..f3f608054 100644 --- a/lib/sbi/openapi/model/non_ue_n2_message_transfer_request.c +++ b/lib/sbi/openapi/model/non_ue_n2_message_transfer_request.c @@ -84,6 +84,10 @@ OpenAPI_non_ue_n2_message_transfer_request_t *OpenAPI_non_ue_n2_message_transfer json_data = cJSON_GetObjectItemCaseSensitive(non_ue_n2_message_transfer_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_n2_information_transfer_req_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_n2_information_transfer_req_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(non_ue_n2_message_transfer_requestJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/notification_data.c b/lib/sbi/openapi/model/notification_data.c index 372a1f4e1..750ef0153 100644 --- a/lib/sbi/openapi/model/notification_data.c +++ b/lib/sbi/openapi/model/notification_data.c @@ -176,6 +176,10 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti nf_profile = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "nfProfile"); if (nf_profile) { nf_profile_local_nonprim = OpenAPI_nf_profile_parseFromJSON(nf_profile); + if (!nf_profile_local_nonprim) { + ogs_error("OpenAPI_nf_profile_parseFromJSON failed [nf_profile]"); + goto end; + } } profile_changes = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "profileChanges"); @@ -196,7 +200,6 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti OpenAPI_change_item_t *profile_changesItem = OpenAPI_change_item_parseFromJSON(profile_changes_local); if (!profile_changesItem) { ogs_error("No profile_changesItem"); - OpenAPI_list_free(profile_changesList); goto end; } OpenAPI_list_add(profile_changesList, profile_changesItem); @@ -215,6 +218,10 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti subscription_context = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "subscriptionContext"); if (subscription_context) { subscription_context_local_nonprim = OpenAPI_subscription_context_parseFromJSON(subscription_context); + if (!subscription_context_local_nonprim) { + ogs_error("OpenAPI_subscription_context_parseFromJSON failed [subscription_context]"); + goto end; + } } notification_data_local_var = OpenAPI_notification_data_create ( diff --git a/lib/sbi/openapi/model/notification_item.c b/lib/sbi/openapi/model/notification_item.c index 16d29fbf9..f5649e980 100644 --- a/lib/sbi/openapi/model/notification_item.c +++ b/lib/sbi/openapi/model/notification_item.c @@ -119,7 +119,6 @@ OpenAPI_notification_item_t *OpenAPI_notification_item_parseFromJSON(cJSON *noti OpenAPI_updated_item_t *notif_itemsItem = OpenAPI_updated_item_parseFromJSON(notif_items_local); if (!notif_itemsItem) { ogs_error("No notif_itemsItem"); - OpenAPI_list_free(notif_itemsList); goto end; } OpenAPI_list_add(notif_itemsList, notif_itemsItem); diff --git a/lib/sbi/openapi/model/notify_item.c b/lib/sbi/openapi/model/notify_item.c index 6d41dc516..fcbcd7916 100644 --- a/lib/sbi/openapi/model/notify_item.c +++ b/lib/sbi/openapi/model/notify_item.c @@ -119,7 +119,6 @@ OpenAPI_notify_item_t *OpenAPI_notify_item_parseFromJSON(cJSON *notify_itemJSON) OpenAPI_change_item_t *changesItem = OpenAPI_change_item_parseFromJSON(changes_local); if (!changesItem) { ogs_error("No changesItem"); - OpenAPI_list_free(changesList); goto end; } OpenAPI_list_add(changesList, changesItem); diff --git a/lib/sbi/openapi/model/nr_location.c b/lib/sbi/openapi/model/nr_location.c index 6d62bdfd7..0778c8281 100644 --- a/lib/sbi/openapi/model/nr_location.c +++ b/lib/sbi/openapi/model/nr_location.c @@ -182,6 +182,10 @@ OpenAPI_nr_location_t *OpenAPI_nr_location_parseFromJSON(cJSON *nr_locationJSON) goto end; } tai_local_nonprim = OpenAPI_tai_parseFromJSON(tai); + if (!tai_local_nonprim) { + ogs_error("OpenAPI_tai_parseFromJSON failed [tai]"); + goto end; + } ncgi = cJSON_GetObjectItemCaseSensitive(nr_locationJSON, "ncgi"); if (!ncgi) { @@ -189,6 +193,10 @@ OpenAPI_nr_location_t *OpenAPI_nr_location_parseFromJSON(cJSON *nr_locationJSON) goto end; } ncgi_local_nonprim = OpenAPI_ncgi_parseFromJSON(ncgi); + if (!ncgi_local_nonprim) { + ogs_error("OpenAPI_ncgi_parseFromJSON failed [ncgi]"); + goto end; + } ignore_ncgi = cJSON_GetObjectItemCaseSensitive(nr_locationJSON, "ignoreNcgi"); if (ignore_ncgi) { @@ -233,6 +241,10 @@ OpenAPI_nr_location_t *OpenAPI_nr_location_parseFromJSON(cJSON *nr_locationJSON) global_gnb_id = cJSON_GetObjectItemCaseSensitive(nr_locationJSON, "globalGnbId"); if (global_gnb_id) { global_gnb_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(global_gnb_id); + if (!global_gnb_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [global_gnb_id]"); + goto end; + } } nr_location_local_var = OpenAPI_nr_location_create ( diff --git a/lib/sbi/openapi/model/nrf_info_served_amf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_amf_info_value.c index b1a03489f..bb01bb8e4 100644 --- a/lib/sbi/openapi/model/nrf_info_served_amf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_amf_info_value.c @@ -286,7 +286,6 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); @@ -310,7 +309,6 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -335,7 +333,6 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -360,7 +357,6 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value OpenAPI_guami_t *backup_info_amf_failureItem = OpenAPI_guami_parseFromJSON(backup_info_amf_failure_local); if (!backup_info_amf_failureItem) { ogs_error("No backup_info_amf_failureItem"); - OpenAPI_list_free(backup_info_amf_failureList); goto end; } OpenAPI_list_add(backup_info_amf_failureList, backup_info_amf_failureItem); @@ -385,7 +381,6 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value OpenAPI_guami_t *backup_info_amf_removalItem = OpenAPI_guami_parseFromJSON(backup_info_amf_removal_local); if (!backup_info_amf_removalItem) { ogs_error("No backup_info_amf_removalItem"); - OpenAPI_list_free(backup_info_amf_removalList); goto end; } OpenAPI_list_add(backup_info_amf_removalList, backup_info_amf_removalItem); @@ -395,6 +390,10 @@ OpenAPI_nrf_info_served_amf_info_value_t *OpenAPI_nrf_info_served_amf_info_value n2_interface_amf_info = cJSON_GetObjectItemCaseSensitive(nrf_info_served_amf_info_valueJSON, "n2InterfaceAmfInfo"); if (n2_interface_amf_info) { n2_interface_amf_info_local_nonprim = OpenAPI_n2_interface_amf_info_parseFromJSON(n2_interface_amf_info); + if (!n2_interface_amf_info_local_nonprim) { + ogs_error("OpenAPI_n2_interface_amf_info_parseFromJSON failed [n2_interface_amf_info]"); + goto end; + } } amf_onboarding_capability = cJSON_GetObjectItemCaseSensitive(nrf_info_served_amf_info_valueJSON, "amfOnboardingCapability"); diff --git a/lib/sbi/openapi/model/nrf_info_served_ausf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_ausf_info_value.c index 67401920f..7719565b4 100644 --- a/lib/sbi/openapi/model/nrf_info_served_ausf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_ausf_info_value.c @@ -162,7 +162,6 @@ OpenAPI_nrf_info_served_ausf_info_value_t *OpenAPI_nrf_info_served_ausf_info_val OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -208,7 +207,6 @@ OpenAPI_nrf_info_served_ausf_info_value_t *OpenAPI_nrf_info_served_ausf_info_val OpenAPI_suci_info_t *suci_infosItem = OpenAPI_suci_info_parseFromJSON(suci_infos_local); if (!suci_infosItem) { ogs_error("No suci_infosItem"); - OpenAPI_list_free(suci_infosList); goto end; } OpenAPI_list_add(suci_infosList, suci_infosItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_bsf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_bsf_info_value.c index 00ebfd567..2df01d056 100644 --- a/lib/sbi/openapi/model/nrf_info_served_bsf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_bsf_info_value.c @@ -303,7 +303,6 @@ OpenAPI_nrf_info_served_bsf_info_value_t *OpenAPI_nrf_info_served_bsf_info_value OpenAPI_ipv4_address_range_t *ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_address_ranges_local); if (!ipv4_address_rangesItem) { ogs_error("No ipv4_address_rangesItem"); - OpenAPI_list_free(ipv4_address_rangesList); goto end; } OpenAPI_list_add(ipv4_address_rangesList, ipv4_address_rangesItem); @@ -328,7 +327,6 @@ OpenAPI_nrf_info_served_bsf_info_value_t *OpenAPI_nrf_info_served_bsf_info_value OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local); if (!ipv6_prefix_rangesItem) { ogs_error("No ipv6_prefix_rangesItem"); - OpenAPI_list_free(ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem); @@ -377,7 +375,6 @@ OpenAPI_nrf_info_served_bsf_info_value_t *OpenAPI_nrf_info_served_bsf_info_value OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -402,7 +399,6 @@ OpenAPI_nrf_info_served_bsf_info_value_t *OpenAPI_nrf_info_served_bsf_info_value OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_chf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_chf_info_value.c index e1600752f..f47d33002 100644 --- a/lib/sbi/openapi/model/nrf_info_served_chf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_chf_info_value.c @@ -184,7 +184,6 @@ OpenAPI_nrf_info_served_chf_info_value_t *OpenAPI_nrf_info_served_chf_info_value OpenAPI_supi_range_t *supi_range_listItem = OpenAPI_supi_range_parseFromJSON(supi_range_list_local); if (!supi_range_listItem) { ogs_error("No supi_range_listItem"); - OpenAPI_list_free(supi_range_listList); goto end; } OpenAPI_list_add(supi_range_listList, supi_range_listItem); @@ -209,7 +208,6 @@ OpenAPI_nrf_info_served_chf_info_value_t *OpenAPI_nrf_info_served_chf_info_value OpenAPI_identity_range_t *gpsi_range_listItem = OpenAPI_identity_range_parseFromJSON(gpsi_range_list_local); if (!gpsi_range_listItem) { ogs_error("No gpsi_range_listItem"); - OpenAPI_list_free(gpsi_range_listList); goto end; } OpenAPI_list_add(gpsi_range_listList, gpsi_range_listItem); @@ -234,7 +232,6 @@ OpenAPI_nrf_info_served_chf_info_value_t *OpenAPI_nrf_info_served_chf_info_value OpenAPI_plmn_range_t *plmn_range_listItem = OpenAPI_plmn_range_parseFromJSON(plmn_range_list_local); if (!plmn_range_listItem) { ogs_error("No plmn_range_listItem"); - OpenAPI_list_free(plmn_range_listList); goto end; } OpenAPI_list_add(plmn_range_listList, plmn_range_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_gmlc_info_value.c b/lib/sbi/openapi/model/nrf_info_served_gmlc_info_value.c index 323f38ab7..432dcf94e 100644 --- a/lib/sbi/openapi/model/nrf_info_served_gmlc_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_gmlc_info_value.c @@ -113,7 +113,6 @@ OpenAPI_nrf_info_served_gmlc_info_value_t *OpenAPI_nrf_info_served_gmlc_info_val OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local); if (!serving_client_typesItem) { ogs_error("No serving_client_typesItem"); - OpenAPI_list_free(serving_client_typesList); goto end; } OpenAPI_list_add(serving_client_typesList, serving_client_typesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_hss_info_list_value_value.c b/lib/sbi/openapi/model/nrf_info_served_hss_info_list_value_value.c index 841957ee7..3e675b056 100644 --- a/lib/sbi/openapi/model/nrf_info_served_hss_info_list_value_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_hss_info_list_value_value.c @@ -239,7 +239,6 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss OpenAPI_imsi_range_t *imsi_rangesItem = OpenAPI_imsi_range_parseFromJSON(imsi_ranges_local); if (!imsi_rangesItem) { ogs_error("No imsi_rangesItem"); - OpenAPI_list_free(imsi_rangesList); goto end; } OpenAPI_list_add(imsi_rangesList, imsi_rangesItem); @@ -264,7 +263,6 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss OpenAPI_identity_range_t *ims_private_identity_rangesItem = OpenAPI_identity_range_parseFromJSON(ims_private_identity_ranges_local); if (!ims_private_identity_rangesItem) { ogs_error("No ims_private_identity_rangesItem"); - OpenAPI_list_free(ims_private_identity_rangesList); goto end; } OpenAPI_list_add(ims_private_identity_rangesList, ims_private_identity_rangesItem); @@ -289,7 +287,6 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss OpenAPI_identity_range_t *ims_public_identity_rangesItem = OpenAPI_identity_range_parseFromJSON(ims_public_identity_ranges_local); if (!ims_public_identity_rangesItem) { ogs_error("No ims_public_identity_rangesItem"); - OpenAPI_list_free(ims_public_identity_rangesList); goto end; } OpenAPI_list_add(ims_public_identity_rangesList, ims_public_identity_rangesItem); @@ -314,7 +311,6 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss OpenAPI_identity_range_t *msisdn_rangesItem = OpenAPI_identity_range_parseFromJSON(msisdn_ranges_local); if (!msisdn_rangesItem) { ogs_error("No msisdn_rangesItem"); - OpenAPI_list_free(msisdn_rangesList); goto end; } OpenAPI_list_add(msisdn_rangesList, msisdn_rangesItem); @@ -339,7 +335,6 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -349,6 +344,10 @@ OpenAPI_nrf_info_served_hss_info_list_value_value_t *OpenAPI_nrf_info_served_hss hss_diameter_address = cJSON_GetObjectItemCaseSensitive(nrf_info_served_hss_info_list_value_valueJSON, "hssDiameterAddress"); if (hss_diameter_address) { hss_diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_parseFromJSON(hss_diameter_address); + if (!hss_diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_parseFromJSON failed [hss_diameter_address]"); + goto end; + } } nrf_info_served_hss_info_list_value_value_local_var = OpenAPI_nrf_info_served_hss_info_list_value_value_create ( diff --git a/lib/sbi/openapi/model/nrf_info_served_lmf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_lmf_info_value.c index 4e0512944..cbe51ed31 100644 --- a/lib/sbi/openapi/model/nrf_info_served_lmf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_lmf_info_value.c @@ -249,7 +249,6 @@ OpenAPI_nrf_info_served_lmf_info_value_t *OpenAPI_nrf_info_served_lmf_info_value OpenAPI_external_client_type_t *serving_client_typesItem = OpenAPI_external_client_type_parseFromJSON(serving_client_types_local); if (!serving_client_typesItem) { ogs_error("No serving_client_typesItem"); - OpenAPI_list_free(serving_client_typesList); goto end; } OpenAPI_list_add(serving_client_typesList, serving_client_typesItem); @@ -339,7 +338,6 @@ OpenAPI_nrf_info_served_lmf_info_value_t *OpenAPI_nrf_info_served_lmf_info_value OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -364,7 +362,6 @@ OpenAPI_nrf_info_served_lmf_info_value_t *OpenAPI_nrf_info_served_lmf_info_value OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -389,7 +386,6 @@ OpenAPI_nrf_info_served_lmf_info_value_t *OpenAPI_nrf_info_served_lmf_info_value OpenAPI_supported_gad_shapes_t *supported_gad_shapesItem = OpenAPI_supported_gad_shapes_parseFromJSON(supported_gad_shapes_local); if (!supported_gad_shapesItem) { ogs_error("No supported_gad_shapesItem"); - OpenAPI_list_free(supported_gad_shapesList); goto end; } OpenAPI_list_add(supported_gad_shapesList, supported_gad_shapesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_mb_smf_info_list_value_value.c b/lib/sbi/openapi/model/nrf_info_served_mb_smf_info_list_value_value.c index b18e9c43c..9c6c937cb 100644 --- a/lib/sbi/openapi/model/nrf_info_served_mb_smf_info_list_value_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_mb_smf_info_list_value_value.c @@ -275,7 +275,6 @@ OpenAPI_nrf_info_served_mb_smf_info_list_value_value_t *OpenAPI_nrf_info_served_ OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -300,7 +299,6 @@ OpenAPI_nrf_info_served_mb_smf_info_list_value_value_t *OpenAPI_nrf_info_served_ OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_nef_info_value.c b/lib/sbi/openapi/model/nrf_info_served_nef_info_value.c index 499194a0a..d0b8c1198 100644 --- a/lib/sbi/openapi/model/nrf_info_served_nef_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_nef_info_value.c @@ -307,11 +307,19 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value pfd_data = cJSON_GetObjectItemCaseSensitive(nrf_info_served_nef_info_valueJSON, "pfdData"); if (pfd_data) { pfd_data_local_nonprim = OpenAPI_pfd_data_parseFromJSON(pfd_data); + if (!pfd_data_local_nonprim) { + ogs_error("OpenAPI_pfd_data_parseFromJSON failed [pfd_data]"); + goto end; + } } af_ee_data = cJSON_GetObjectItemCaseSensitive(nrf_info_served_nef_info_valueJSON, "afEeData"); if (af_ee_data) { af_ee_data_local_nonprim = OpenAPI_af_event_exposure_data_parseFromJSON(af_ee_data); + if (!af_ee_data_local_nonprim) { + ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON failed [af_ee_data]"); + goto end; + } } gpsi_ranges = cJSON_GetObjectItemCaseSensitive(nrf_info_served_nef_info_valueJSON, "gpsiRanges"); @@ -332,7 +340,6 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -357,7 +364,6 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -403,7 +409,6 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -428,7 +433,6 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -474,7 +478,6 @@ OpenAPI_nrf_info_served_nef_info_value_t *OpenAPI_nrf_info_served_nef_info_value OpenAPI_un_trust_af_info_t *un_trust_af_info_listItem = OpenAPI_un_trust_af_info_parseFromJSON(un_trust_af_info_list_local); if (!un_trust_af_info_listItem) { ogs_error("No un_trust_af_info_listItem"); - OpenAPI_list_free(un_trust_af_info_listList); goto end; } OpenAPI_list_add(un_trust_af_info_listList, un_trust_af_info_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_nwdaf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_nwdaf_info_value.c index d6299393d..c253040d4 100644 --- a/lib/sbi/openapi/model/nrf_info_served_nwdaf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_nwdaf_info_value.c @@ -276,7 +276,6 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v OpenAPI_event_id_t *event_idsItem = OpenAPI_event_id_parseFromJSON(event_ids_local); if (!event_idsItem) { ogs_error("No event_idsItem"); - OpenAPI_list_free(event_idsList); goto end; } OpenAPI_list_add(event_idsList, event_idsItem); @@ -301,7 +300,6 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v OpenAPI_nwdaf_event_t *nwdaf_eventsItem = OpenAPI_nwdaf_event_parseFromJSON(nwdaf_events_local); if (!nwdaf_eventsItem) { ogs_error("No nwdaf_eventsItem"); - OpenAPI_list_free(nwdaf_eventsList); goto end; } OpenAPI_list_add(nwdaf_eventsList, nwdaf_eventsItem); @@ -326,7 +324,6 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -351,7 +348,6 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -361,6 +357,10 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v nwdaf_capability = cJSON_GetObjectItemCaseSensitive(nrf_info_served_nwdaf_info_valueJSON, "nwdafCapability"); if (nwdaf_capability) { nwdaf_capability_local_nonprim = OpenAPI_nwdaf_capability_parseFromJSON(nwdaf_capability); + if (!nwdaf_capability_local_nonprim) { + ogs_error("OpenAPI_nwdaf_capability_parseFromJSON failed [nwdaf_capability]"); + goto end; + } } analytics_delay = cJSON_GetObjectItemCaseSensitive(nrf_info_served_nwdaf_info_valueJSON, "analyticsDelay"); @@ -429,7 +429,6 @@ OpenAPI_nrf_info_served_nwdaf_info_value_t *OpenAPI_nrf_info_served_nwdaf_info_v OpenAPI_ml_analytics_info_t *ml_analytics_listItem = OpenAPI_ml_analytics_info_parseFromJSON(ml_analytics_list_local); if (!ml_analytics_listItem) { ogs_error("No ml_analytics_listItem"); - OpenAPI_list_free(ml_analytics_listList); goto end; } OpenAPI_list_add(ml_analytics_listList, ml_analytics_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_pcf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_pcf_info_value.c index aae2b43c3..81cd4fa1e 100644 --- a/lib/sbi/openapi/model/nrf_info_served_pcf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_pcf_info_value.c @@ -277,7 +277,6 @@ OpenAPI_nrf_info_served_pcf_info_value_t *OpenAPI_nrf_info_served_pcf_info_value OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -302,7 +301,6 @@ OpenAPI_nrf_info_served_pcf_info_value_t *OpenAPI_nrf_info_served_pcf_info_value OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -344,11 +342,19 @@ OpenAPI_nrf_info_served_pcf_info_value_t *OpenAPI_nrf_info_served_pcf_info_value prose_capability = cJSON_GetObjectItemCaseSensitive(nrf_info_served_pcf_info_valueJSON, "proseCapability"); if (prose_capability) { prose_capability_local_nonprim = OpenAPI_pro_se_capability_parseFromJSON(prose_capability); + if (!prose_capability_local_nonprim) { + ogs_error("OpenAPI_pro_se_capability_parseFromJSON failed [prose_capability]"); + goto end; + } } v2x_capability = cJSON_GetObjectItemCaseSensitive(nrf_info_served_pcf_info_valueJSON, "v2xCapability"); if (v2x_capability) { v2x_capability_local_nonprim = OpenAPI_v2x_capability_parseFromJSON(v2x_capability); + if (!v2x_capability_local_nonprim) { + ogs_error("OpenAPI_v2x_capability_parseFromJSON failed [v2x_capability]"); + goto end; + } } nrf_info_served_pcf_info_value_local_var = OpenAPI_nrf_info_served_pcf_info_value_create ( diff --git a/lib/sbi/openapi/model/nrf_info_served_pcscf_info_list_value_value.c b/lib/sbi/openapi/model/nrf_info_served_pcscf_info_list_value_value.c index 35dbad48f..bc68ef3ab 100644 --- a/lib/sbi/openapi/model/nrf_info_served_pcscf_info_list_value_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_pcscf_info_list_value_value.c @@ -430,7 +430,6 @@ OpenAPI_nrf_info_served_pcscf_info_list_value_value_t *OpenAPI_nrf_info_served_p OpenAPI_ipv4_address_range_t *served_ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(served_ipv4_address_ranges_local); if (!served_ipv4_address_rangesItem) { ogs_error("No served_ipv4_address_rangesItem"); - OpenAPI_list_free(served_ipv4_address_rangesList); goto end; } OpenAPI_list_add(served_ipv4_address_rangesList, served_ipv4_address_rangesItem); @@ -455,7 +454,6 @@ OpenAPI_nrf_info_served_pcscf_info_list_value_value_t *OpenAPI_nrf_info_served_p OpenAPI_ipv6_prefix_range_t *served_ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(served_ipv6_prefix_ranges_local); if (!served_ipv6_prefix_rangesItem) { ogs_error("No served_ipv6_prefix_rangesItem"); - OpenAPI_list_free(served_ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(served_ipv6_prefix_rangesList, served_ipv6_prefix_rangesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_scp_info_list_value.c b/lib/sbi/openapi/model/nrf_info_served_scp_info_list_value.c index 72f931616..5b448074a 100644 --- a/lib/sbi/openapi/model/nrf_info_served_scp_info_list_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_scp_info_list_value.c @@ -511,7 +511,6 @@ OpenAPI_nrf_info_served_scp_info_list_value_t *OpenAPI_nrf_info_served_scp_info_ OpenAPI_ipv4_address_range_t *ipv4_addr_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_addr_ranges_local); if (!ipv4_addr_rangesItem) { ogs_error("No ipv4_addr_rangesItem"); - OpenAPI_list_free(ipv4_addr_rangesList); goto end; } OpenAPI_list_add(ipv4_addr_rangesList, ipv4_addr_rangesItem); @@ -536,7 +535,6 @@ OpenAPI_nrf_info_served_scp_info_list_value_t *OpenAPI_nrf_info_served_scp_info_ OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local); if (!ipv6_prefix_rangesItem) { ogs_error("No ipv6_prefix_rangesItem"); - OpenAPI_list_free(ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem); @@ -582,7 +580,6 @@ OpenAPI_nrf_info_served_scp_info_list_value_t *OpenAPI_nrf_info_served_scp_info_ OpenAPI_plmn_id_t *remote_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(remote_plmn_list_local); if (!remote_plmn_listItem) { ogs_error("No remote_plmn_listItem"); - OpenAPI_list_free(remote_plmn_listList); goto end; } OpenAPI_list_add(remote_plmn_listList, remote_plmn_listItem); @@ -607,7 +604,6 @@ OpenAPI_nrf_info_served_scp_info_list_value_t *OpenAPI_nrf_info_served_scp_info_ OpenAPI_plmn_id_nid_t *remote_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(remote_snpn_list_local); if (!remote_snpn_listItem) { ogs_error("No remote_snpn_listItem"); - OpenAPI_list_free(remote_snpn_listList); goto end; } OpenAPI_list_add(remote_snpn_listList, remote_snpn_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_sepp_info_list_value.c b/lib/sbi/openapi/model/nrf_info_served_sepp_info_list_value.c index 6fd9f892b..1517c8b0b 100644 --- a/lib/sbi/openapi/model/nrf_info_served_sepp_info_list_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_sepp_info_list_value.c @@ -199,7 +199,6 @@ OpenAPI_nrf_info_served_sepp_info_list_value_t *OpenAPI_nrf_info_served_sepp_inf OpenAPI_plmn_id_t *remote_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(remote_plmn_list_local); if (!remote_plmn_listItem) { ogs_error("No remote_plmn_listItem"); - OpenAPI_list_free(remote_plmn_listList); goto end; } OpenAPI_list_add(remote_plmn_listList, remote_plmn_listItem); @@ -224,7 +223,6 @@ OpenAPI_nrf_info_served_sepp_info_list_value_t *OpenAPI_nrf_info_served_sepp_inf OpenAPI_plmn_id_nid_t *remote_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(remote_snpn_list_local); if (!remote_snpn_listItem) { ogs_error("No remote_snpn_listItem"); - OpenAPI_list_free(remote_snpn_listList); goto end; } OpenAPI_list_add(remote_snpn_listList, remote_snpn_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_smf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_smf_info_value.c index d1acb8792..f000f8c8e 100644 --- a/lib/sbi/openapi/model/nrf_info_served_smf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_smf_info_value.c @@ -295,7 +295,6 @@ OpenAPI_nrf_info_served_smf_info_value_t *OpenAPI_nrf_info_served_smf_info_value OpenAPI_snssai_smf_info_item_t *s_nssai_smf_info_listItem = OpenAPI_snssai_smf_info_item_parseFromJSON(s_nssai_smf_info_list_local); if (!s_nssai_smf_info_listItem) { ogs_error("No s_nssai_smf_info_listItem"); - OpenAPI_list_free(s_nssai_smf_info_listList); goto end; } OpenAPI_list_add(s_nssai_smf_info_listList, s_nssai_smf_info_listItem); @@ -319,7 +318,6 @@ OpenAPI_nrf_info_served_smf_info_value_t *OpenAPI_nrf_info_served_smf_info_value OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -344,7 +342,6 @@ OpenAPI_nrf_info_served_smf_info_value_t *OpenAPI_nrf_info_served_smf_info_value OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -377,7 +374,6 @@ OpenAPI_nrf_info_served_smf_info_value_t *OpenAPI_nrf_info_served_smf_info_value OpenAPI_ip_addr_t *pgw_ip_addr_listItem = OpenAPI_ip_addr_parseFromJSON(pgw_ip_addr_list_local); if (!pgw_ip_addr_listItem) { ogs_error("No pgw_ip_addr_listItem"); - OpenAPI_list_free(pgw_ip_addr_listList); goto end; } OpenAPI_list_add(pgw_ip_addr_listList, pgw_ip_addr_listItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_udm_info_value.c b/lib/sbi/openapi/model/nrf_info_served_udm_info_value.c index 1751acef6..e9a0eb55b 100644 --- a/lib/sbi/openapi/model/nrf_info_served_udm_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_udm_info_value.c @@ -243,7 +243,6 @@ OpenAPI_nrf_info_served_udm_info_value_t *OpenAPI_nrf_info_served_udm_info_value OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -268,7 +267,6 @@ OpenAPI_nrf_info_served_udm_info_value_t *OpenAPI_nrf_info_served_udm_info_value OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -293,7 +291,6 @@ OpenAPI_nrf_info_served_udm_info_value_t *OpenAPI_nrf_info_served_udm_info_value OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -339,7 +336,6 @@ OpenAPI_nrf_info_served_udm_info_value_t *OpenAPI_nrf_info_served_udm_info_value OpenAPI_internal_group_id_range_t *internal_group_identifiers_rangesItem = OpenAPI_internal_group_id_range_parseFromJSON(internal_group_identifiers_ranges_local); if (!internal_group_identifiers_rangesItem) { ogs_error("No internal_group_identifiers_rangesItem"); - OpenAPI_list_free(internal_group_identifiers_rangesList); goto end; } OpenAPI_list_add(internal_group_identifiers_rangesList, internal_group_identifiers_rangesItem); @@ -364,7 +360,6 @@ OpenAPI_nrf_info_served_udm_info_value_t *OpenAPI_nrf_info_served_udm_info_value OpenAPI_suci_info_t *suci_infosItem = OpenAPI_suci_info_parseFromJSON(suci_infos_local); if (!suci_infosItem) { ogs_error("No suci_infosItem"); - OpenAPI_list_free(suci_infosList); goto end; } OpenAPI_list_add(suci_infosList, suci_infosItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_udr_info_value.c b/lib/sbi/openapi/model/nrf_info_served_udr_info_value.c index 1a6b63b21..87e1a2761 100644 --- a/lib/sbi/openapi/model/nrf_info_served_udr_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_udr_info_value.c @@ -213,7 +213,6 @@ OpenAPI_nrf_info_served_udr_info_value_t *OpenAPI_nrf_info_served_udr_info_value OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -238,7 +237,6 @@ OpenAPI_nrf_info_served_udr_info_value_t *OpenAPI_nrf_info_served_udr_info_value OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -263,7 +261,6 @@ OpenAPI_nrf_info_served_udr_info_value_t *OpenAPI_nrf_info_served_udr_info_value OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -307,7 +304,6 @@ OpenAPI_nrf_info_served_udr_info_value_t *OpenAPI_nrf_info_served_udr_info_value OpenAPI_shared_data_id_range_t *shared_data_id_rangesItem = OpenAPI_shared_data_id_range_parseFromJSON(shared_data_id_ranges_local); if (!shared_data_id_rangesItem) { ogs_error("No shared_data_id_rangesItem"); - OpenAPI_list_free(shared_data_id_rangesList); goto end; } OpenAPI_list_add(shared_data_id_rangesList, shared_data_id_rangesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_udsf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_udsf_info_value.c index 91cdae8bd..e76d6713e 100644 --- a/lib/sbi/openapi/model/nrf_info_served_udsf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_udsf_info_value.c @@ -146,7 +146,6 @@ OpenAPI_nrf_info_served_udsf_info_value_t *OpenAPI_nrf_info_served_udsf_info_val OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); diff --git a/lib/sbi/openapi/model/nrf_info_served_upf_info_value.c b/lib/sbi/openapi/model/nrf_info_served_upf_info_value.c index 1beb53c70..6a6c84c73 100644 --- a/lib/sbi/openapi/model/nrf_info_served_upf_info_value.c +++ b/lib/sbi/openapi/model/nrf_info_served_upf_info_value.c @@ -391,7 +391,6 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value OpenAPI_snssai_upf_info_item_t *s_nssai_upf_info_listItem = OpenAPI_snssai_upf_info_item_parseFromJSON(s_nssai_upf_info_list_local); if (!s_nssai_upf_info_listItem) { ogs_error("No s_nssai_upf_info_listItem"); - OpenAPI_list_free(s_nssai_upf_info_listList); goto end; } OpenAPI_list_add(s_nssai_upf_info_listList, s_nssai_upf_info_listItem); @@ -436,7 +435,6 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value OpenAPI_interface_upf_info_item_t *interface_upf_info_listItem = OpenAPI_interface_upf_info_item_parseFromJSON(interface_upf_info_list_local); if (!interface_upf_info_listItem) { ogs_error("No interface_upf_info_listItem"); - OpenAPI_list_free(interface_upf_info_listList); goto end; } OpenAPI_list_add(interface_upf_info_listList, interface_upf_info_listItem); @@ -473,6 +471,10 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value atsss_capability = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "atsssCapability"); if (atsss_capability) { atsss_capability_local_nonprim = OpenAPI_atsss_capability_parseFromJSON(atsss_capability); + if (!atsss_capability_local_nonprim) { + ogs_error("OpenAPI_atsss_capability_parseFromJSON failed [atsss_capability]"); + goto end; + } } ue_ip_addr_ind = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "ueIpAddrInd"); @@ -501,7 +503,6 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -526,7 +527,6 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -536,16 +536,28 @@ OpenAPI_nrf_info_served_upf_info_value_t *OpenAPI_nrf_info_served_upf_info_value w_agf_info = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "wAgfInfo"); if (w_agf_info) { w_agf_info_local_nonprim = OpenAPI_w_agf_info_parseFromJSON(w_agf_info); + if (!w_agf_info_local_nonprim) { + ogs_error("OpenAPI_w_agf_info_parseFromJSON failed [w_agf_info]"); + goto end; + } } tngf_info = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "tngfInfo"); if (tngf_info) { tngf_info_local_nonprim = OpenAPI_tngf_info_parseFromJSON(tngf_info); + if (!tngf_info_local_nonprim) { + ogs_error("OpenAPI_tngf_info_parseFromJSON failed [tngf_info]"); + goto end; + } } twif_info = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "twifInfo"); if (twif_info) { twif_info_local_nonprim = OpenAPI_twif_info_parseFromJSON(twif_info); + if (!twif_info_local_nonprim) { + ogs_error("OpenAPI_twif_info_parseFromJSON failed [twif_info]"); + goto end; + } } priority = cJSON_GetObjectItemCaseSensitive(nrf_info_served_upf_info_valueJSON, "priority"); diff --git a/lib/sbi/openapi/model/nrppa_information.c b/lib/sbi/openapi/model/nrppa_information.c index f8127226f..b9acf95d8 100644 --- a/lib/sbi/openapi/model/nrppa_information.c +++ b/lib/sbi/openapi/model/nrppa_information.c @@ -112,6 +112,10 @@ OpenAPI_nrppa_information_t *OpenAPI_nrppa_information_parseFromJSON(cJSON *nrpp goto end; } nrppa_pdu_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(nrppa_pdu); + if (!nrppa_pdu_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [nrppa_pdu]"); + goto end; + } service_instance_id = cJSON_GetObjectItemCaseSensitive(nrppa_informationJSON, "serviceInstanceId"); if (service_instance_id) { diff --git a/lib/sbi/openapi/model/nsacf_info.c b/lib/sbi/openapi/model/nsacf_info.c index 51a6897f7..09f76ec52 100644 --- a/lib/sbi/openapi/model/nsacf_info.c +++ b/lib/sbi/openapi/model/nsacf_info.c @@ -126,6 +126,10 @@ OpenAPI_nsacf_info_t *OpenAPI_nsacf_info_parseFromJSON(cJSON *nsacf_infoJSON) goto end; } nsacf_capability_local_nonprim = OpenAPI_nsacf_capability_parseFromJSON(nsacf_capability); + if (!nsacf_capability_local_nonprim) { + ogs_error("OpenAPI_nsacf_capability_parseFromJSON failed [nsacf_capability]"); + goto end; + } tai_list = cJSON_GetObjectItemCaseSensitive(nsacf_infoJSON, "taiList"); if (tai_list) { @@ -145,7 +149,6 @@ OpenAPI_nsacf_info_t *OpenAPI_nsacf_info_parseFromJSON(cJSON *nsacf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -170,7 +173,6 @@ OpenAPI_nsacf_info_t *OpenAPI_nsacf_info_parseFromJSON(cJSON *nsacf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/nsag_info.c b/lib/sbi/openapi/model/nsag_info.c index 8c42f3958..636fe3f5a 100644 --- a/lib/sbi/openapi/model/nsag_info.c +++ b/lib/sbi/openapi/model/nsag_info.c @@ -203,7 +203,6 @@ OpenAPI_nsag_info_t *OpenAPI_nsag_info_parseFromJSON(cJSON *nsag_infoJSON) OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); @@ -227,7 +226,6 @@ OpenAPI_nsag_info_t *OpenAPI_nsag_info_parseFromJSON(cJSON *nsag_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -252,7 +250,6 @@ OpenAPI_nsag_info_t *OpenAPI_nsag_info_parseFromJSON(cJSON *nsag_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/nsi_id_info.c b/lib/sbi/openapi/model/nsi_id_info.c index 9820d27ad..43caa5da9 100644 --- a/lib/sbi/openapi/model/nsi_id_info.c +++ b/lib/sbi/openapi/model/nsi_id_info.c @@ -97,6 +97,10 @@ OpenAPI_nsi_id_info_t *OpenAPI_nsi_id_info_parseFromJSON(cJSON *nsi_id_infoJSON) goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } nsi_ids = cJSON_GetObjectItemCaseSensitive(nsi_id_infoJSON, "nsiIds"); if (nsi_ids) { diff --git a/lib/sbi/openapi/model/nsi_load_level_info.c b/lib/sbi/openapi/model/nsi_load_level_info.c index 934f54dcb..b1fddad6d 100644 --- a/lib/sbi/openapi/model/nsi_load_level_info.c +++ b/lib/sbi/openapi/model/nsi_load_level_info.c @@ -272,6 +272,10 @@ OpenAPI_nsi_load_level_info_t *OpenAPI_nsi_load_level_info_parseFromJSON(cJSON * goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } nsi_id = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "nsiId"); if (nsi_id) { @@ -284,6 +288,10 @@ OpenAPI_nsi_load_level_info_t *OpenAPI_nsi_load_level_info_parseFromJSON(cJSON * res_usage = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "resUsage"); if (res_usage) { res_usage_local_nonprim = OpenAPI_resource_usage_parseFromJSON(res_usage); + if (!res_usage_local_nonprim) { + ogs_error("OpenAPI_resource_usage_parseFromJSON failed [res_usage]"); + goto end; + } } num_of_exceed_load_level_thr = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "numOfExceedLoadLevelThr"); @@ -305,11 +313,19 @@ OpenAPI_nsi_load_level_info_t *OpenAPI_nsi_load_level_info_parseFromJSON(cJSON * network_area = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "networkArea"); if (network_area) { network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } } time_period = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "timePeriod"); if (time_period) { time_period_local_nonprim = OpenAPI_time_window_parseFromJSON(time_period); + if (!time_period_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [time_period]"); + goto end; + } } res_usg_thr_cross_time_period = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "resUsgThrCrossTimePeriod"); @@ -330,7 +346,6 @@ OpenAPI_nsi_load_level_info_t *OpenAPI_nsi_load_level_info_parseFromJSON(cJSON * OpenAPI_time_window_t *res_usg_thr_cross_time_periodItem = OpenAPI_time_window_parseFromJSON(res_usg_thr_cross_time_period_local); if (!res_usg_thr_cross_time_periodItem) { ogs_error("No res_usg_thr_cross_time_periodItem"); - OpenAPI_list_free(res_usg_thr_cross_time_periodList); goto end; } OpenAPI_list_add(res_usg_thr_cross_time_periodList, res_usg_thr_cross_time_periodItem); @@ -340,11 +355,19 @@ OpenAPI_nsi_load_level_info_t *OpenAPI_nsi_load_level_info_parseFromJSON(cJSON * num_of_ues = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "numOfUes"); if (num_of_ues) { num_of_ues_local_nonprim = OpenAPI_number_average_parseFromJSON(num_of_ues); + if (!num_of_ues_local_nonprim) { + ogs_error("OpenAPI_number_average_parseFromJSON failed [num_of_ues]"); + goto end; + } } num_of_pdu_sess = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "numOfPduSess"); if (num_of_pdu_sess) { num_of_pdu_sess_local_nonprim = OpenAPI_number_average_parseFromJSON(num_of_pdu_sess); + if (!num_of_pdu_sess_local_nonprim) { + ogs_error("OpenAPI_number_average_parseFromJSON failed [num_of_pdu_sess]"); + goto end; + } } confidence = cJSON_GetObjectItemCaseSensitive(nsi_load_level_infoJSON, "confidence"); diff --git a/lib/sbi/openapi/model/nssaa_status.c b/lib/sbi/openapi/model/nssaa_status.c index 5eaafb77d..e82ccb0fd 100644 --- a/lib/sbi/openapi/model/nssaa_status.c +++ b/lib/sbi/openapi/model/nssaa_status.c @@ -85,6 +85,10 @@ OpenAPI_nssaa_status_t *OpenAPI_nssaa_status_parseFromJSON(cJSON *nssaa_statusJS goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } status = cJSON_GetObjectItemCaseSensitive(nssaa_statusJSON, "status"); if (!status) { diff --git a/lib/sbi/openapi/model/nssaaf_info.c b/lib/sbi/openapi/model/nssaaf_info.c index 4240a9e8f..8fbeb5d11 100644 --- a/lib/sbi/openapi/model/nssaaf_info.c +++ b/lib/sbi/openapi/model/nssaaf_info.c @@ -115,7 +115,6 @@ OpenAPI_nssaaf_info_t *OpenAPI_nssaaf_info_parseFromJSON(cJSON *nssaaf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -140,7 +139,6 @@ OpenAPI_nssaaf_info_t *OpenAPI_nssaaf_info_parseFromJSON(cJSON *nssaaf_infoJSON) OpenAPI_internal_group_id_range_t *internal_group_identifiers_rangesItem = OpenAPI_internal_group_id_range_parseFromJSON(internal_group_identifiers_ranges_local); if (!internal_group_identifiers_rangesItem) { ogs_error("No internal_group_identifiers_rangesItem"); - OpenAPI_list_free(internal_group_identifiers_rangesList); goto end; } OpenAPI_list_add(internal_group_identifiers_rangesList, internal_group_identifiers_rangesItem); diff --git a/lib/sbi/openapi/model/nssai.c b/lib/sbi/openapi/model/nssai.c index 185837aa8..39d5926c7 100644 --- a/lib/sbi/openapi/model/nssai.c +++ b/lib/sbi/openapi/model/nssai.c @@ -204,7 +204,6 @@ OpenAPI_nssai_t *OpenAPI_nssai_parseFromJSON(cJSON *nssaiJSON) OpenAPI_snssai_t *default_single_nssaisItem = OpenAPI_snssai_parseFromJSON(default_single_nssais_local); if (!default_single_nssaisItem) { ogs_error("No default_single_nssaisItem"); - OpenAPI_list_free(default_single_nssaisList); goto end; } OpenAPI_list_add(default_single_nssaisList, default_single_nssaisItem); @@ -228,7 +227,6 @@ OpenAPI_nssai_t *OpenAPI_nssai_parseFromJSON(cJSON *nssaiJSON) OpenAPI_snssai_t *single_nssaisItem = OpenAPI_snssai_parseFromJSON(single_nssais_local); if (!single_nssaisItem) { ogs_error("No single_nssaisItem"); - OpenAPI_list_free(single_nssaisList); goto end; } OpenAPI_list_add(single_nssaisList, single_nssaisItem); diff --git a/lib/sbi/openapi/model/nssai_1.c b/lib/sbi/openapi/model/nssai_1.c index 82ab982ee..0fdd458a2 100644 --- a/lib/sbi/openapi/model/nssai_1.c +++ b/lib/sbi/openapi/model/nssai_1.c @@ -204,7 +204,6 @@ OpenAPI_nssai_1_t *OpenAPI_nssai_1_parseFromJSON(cJSON *nssai_1JSON) OpenAPI_snssai_t *default_single_nssaisItem = OpenAPI_snssai_parseFromJSON(default_single_nssais_local); if (!default_single_nssaisItem) { ogs_error("No default_single_nssaisItem"); - OpenAPI_list_free(default_single_nssaisList); goto end; } OpenAPI_list_add(default_single_nssaisList, default_single_nssaisItem); @@ -228,7 +227,6 @@ OpenAPI_nssai_1_t *OpenAPI_nssai_1_parseFromJSON(cJSON *nssai_1JSON) OpenAPI_snssai_t *single_nssaisItem = OpenAPI_snssai_parseFromJSON(single_nssais_local); if (!single_nssaisItem) { ogs_error("No single_nssaisItem"); - OpenAPI_list_free(single_nssaisList); goto end; } OpenAPI_list_add(single_nssaisList, single_nssaisItem); diff --git a/lib/sbi/openapi/model/nssai_mapping.c b/lib/sbi/openapi/model/nssai_mapping.c index f02f6e657..6bd33c22c 100644 --- a/lib/sbi/openapi/model/nssai_mapping.c +++ b/lib/sbi/openapi/model/nssai_mapping.c @@ -95,6 +95,10 @@ OpenAPI_nssai_mapping_t *OpenAPI_nssai_mapping_parseFromJSON(cJSON *nssai_mappin goto end; } mapped_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_snssai); + if (!mapped_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [mapped_snssai]"); + goto end; + } h_snssai = cJSON_GetObjectItemCaseSensitive(nssai_mappingJSON, "hSnssai"); if (!h_snssai) { @@ -102,6 +106,10 @@ OpenAPI_nssai_mapping_t *OpenAPI_nssai_mapping_parseFromJSON(cJSON *nssai_mappin goto end; } h_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(h_snssai); + if (!h_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [h_snssai]"); + goto end; + } nssai_mapping_local_var = OpenAPI_nssai_mapping_create ( mapped_snssai_local_nonprim, diff --git a/lib/sbi/openapi/model/nudm_amf_info.c b/lib/sbi/openapi/model/nudm_amf_info.c index c065af3a5..9fad0503b 100644 --- a/lib/sbi/openapi/model/nudm_amf_info.c +++ b/lib/sbi/openapi/model/nudm_amf_info.c @@ -109,6 +109,10 @@ OpenAPI_nudm_amf_info_t *OpenAPI_nudm_amf_info_parseFromJSON(cJSON *nudm_amf_inf goto end; } guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } access_type = cJSON_GetObjectItemCaseSensitive(nudm_amf_infoJSON, "accessType"); if (access_type) { diff --git a/lib/sbi/openapi/model/nwdaf_cond.c b/lib/sbi/openapi/model/nwdaf_cond.c index 627ded7f7..ea3ccb173 100644 --- a/lib/sbi/openapi/model/nwdaf_cond.c +++ b/lib/sbi/openapi/model/nwdaf_cond.c @@ -309,7 +309,6 @@ OpenAPI_nwdaf_cond_t *OpenAPI_nwdaf_cond_parseFromJSON(cJSON *nwdaf_condJSON) OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); @@ -334,7 +333,6 @@ OpenAPI_nwdaf_cond_t *OpenAPI_nwdaf_cond_parseFromJSON(cJSON *nwdaf_condJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -359,7 +357,6 @@ OpenAPI_nwdaf_cond_t *OpenAPI_nwdaf_cond_parseFromJSON(cJSON *nwdaf_condJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -424,7 +421,6 @@ OpenAPI_nwdaf_cond_t *OpenAPI_nwdaf_cond_parseFromJSON(cJSON *nwdaf_condJSON) OpenAPI_ml_analytics_info_t *ml_analytics_listItem = OpenAPI_ml_analytics_info_parseFromJSON(ml_analytics_list_local); if (!ml_analytics_listItem) { ogs_error("No ml_analytics_listItem"); - OpenAPI_list_free(ml_analytics_listList); goto end; } OpenAPI_list_add(ml_analytics_listList, ml_analytics_listItem); diff --git a/lib/sbi/openapi/model/nwdaf_data.c b/lib/sbi/openapi/model/nwdaf_data.c index eb21b73fc..dfd814ce1 100644 --- a/lib/sbi/openapi/model/nwdaf_data.c +++ b/lib/sbi/openapi/model/nwdaf_data.c @@ -114,7 +114,6 @@ OpenAPI_nwdaf_data_t *OpenAPI_nwdaf_data_parseFromJSON(cJSON *nwdaf_dataJSON) OpenAPI_nwdaf_event_t *nwdaf_eventsItem = OpenAPI_nwdaf_event_parseFromJSON(nwdaf_events_local); if (!nwdaf_eventsItem) { ogs_error("No nwdaf_eventsItem"); - OpenAPI_list_free(nwdaf_eventsList); goto end; } OpenAPI_list_add(nwdaf_eventsList, nwdaf_eventsItem); diff --git a/lib/sbi/openapi/model/nwdaf_info.c b/lib/sbi/openapi/model/nwdaf_info.c index a6e2f2a2b..cab6d555f 100644 --- a/lib/sbi/openapi/model/nwdaf_info.c +++ b/lib/sbi/openapi/model/nwdaf_info.c @@ -276,7 +276,6 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) OpenAPI_event_id_t *event_idsItem = OpenAPI_event_id_parseFromJSON(event_ids_local); if (!event_idsItem) { ogs_error("No event_idsItem"); - OpenAPI_list_free(event_idsList); goto end; } OpenAPI_list_add(event_idsList, event_idsItem); @@ -301,7 +300,6 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) OpenAPI_nwdaf_event_t *nwdaf_eventsItem = OpenAPI_nwdaf_event_parseFromJSON(nwdaf_events_local); if (!nwdaf_eventsItem) { ogs_error("No nwdaf_eventsItem"); - OpenAPI_list_free(nwdaf_eventsList); goto end; } OpenAPI_list_add(nwdaf_eventsList, nwdaf_eventsItem); @@ -326,7 +324,6 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -351,7 +348,6 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -361,6 +357,10 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) nwdaf_capability = cJSON_GetObjectItemCaseSensitive(nwdaf_infoJSON, "nwdafCapability"); if (nwdaf_capability) { nwdaf_capability_local_nonprim = OpenAPI_nwdaf_capability_parseFromJSON(nwdaf_capability); + if (!nwdaf_capability_local_nonprim) { + ogs_error("OpenAPI_nwdaf_capability_parseFromJSON failed [nwdaf_capability]"); + goto end; + } } analytics_delay = cJSON_GetObjectItemCaseSensitive(nwdaf_infoJSON, "analyticsDelay"); @@ -429,7 +429,6 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON) OpenAPI_ml_analytics_info_t *ml_analytics_listItem = OpenAPI_ml_analytics_info_parseFromJSON(ml_analytics_list_local); if (!ml_analytics_listItem) { ogs_error("No ml_analytics_listItem"); - OpenAPI_list_free(ml_analytics_listList); goto end; } OpenAPI_list_add(ml_analytics_listList, ml_analytics_listItem); diff --git a/lib/sbi/openapi/model/nwdaf_registration.c b/lib/sbi/openapi/model/nwdaf_registration.c index d4925d62f..c05313bf0 100644 --- a/lib/sbi/openapi/model/nwdaf_registration.c +++ b/lib/sbi/openapi/model/nwdaf_registration.c @@ -207,7 +207,6 @@ OpenAPI_nwdaf_registration_t *OpenAPI_nwdaf_registration_parseFromJSON(cJSON *nw OpenAPI_event_id_t *analytics_idsItem = OpenAPI_event_id_parseFromJSON(analytics_ids_local); if (!analytics_idsItem) { ogs_error("No analytics_idsItem"); - OpenAPI_list_free(analytics_idsList); goto end; } OpenAPI_list_add(analytics_idsList, analytics_idsItem); @@ -232,6 +231,10 @@ OpenAPI_nwdaf_registration_t *OpenAPI_nwdaf_registration_parseFromJSON(cJSON *nw context_info = cJSON_GetObjectItemCaseSensitive(nwdaf_registrationJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(nwdaf_registrationJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/nwdaf_registration_info.c b/lib/sbi/openapi/model/nwdaf_registration_info.c index ebb73a62c..4903ac7dd 100644 --- a/lib/sbi/openapi/model/nwdaf_registration_info.c +++ b/lib/sbi/openapi/model/nwdaf_registration_info.c @@ -93,7 +93,6 @@ OpenAPI_nwdaf_registration_info_t *OpenAPI_nwdaf_registration_info_parseFromJSON OpenAPI_nwdaf_registration_t *nwdaf_registration_listItem = OpenAPI_nwdaf_registration_parseFromJSON(nwdaf_registration_list_local); if (!nwdaf_registration_listItem) { ogs_error("No nwdaf_registration_listItem"); - OpenAPI_list_free(nwdaf_registration_listList); goto end; } OpenAPI_list_add(nwdaf_registration_listList, nwdaf_registration_listItem); diff --git a/lib/sbi/openapi/model/nwdaf_registration_modification.c b/lib/sbi/openapi/model/nwdaf_registration_modification.c index fcf8c691a..8ac1b44ec 100644 --- a/lib/sbi/openapi/model/nwdaf_registration_modification.c +++ b/lib/sbi/openapi/model/nwdaf_registration_modification.c @@ -150,7 +150,6 @@ OpenAPI_nwdaf_registration_modification_t *OpenAPI_nwdaf_registration_modificati OpenAPI_event_id_t *analytics_idsItem = OpenAPI_event_id_parseFromJSON(analytics_ids_local); if (!analytics_idsItem) { ogs_error("No analytics_idsItem"); - OpenAPI_list_free(analytics_idsList); goto end; } OpenAPI_list_add(analytics_idsList, analytics_idsItem); diff --git a/lib/sbi/openapi/model/nwdaf_subscription.c b/lib/sbi/openapi/model/nwdaf_subscription.c index afb9cffcc..3b8fa8ba9 100644 --- a/lib/sbi/openapi/model/nwdaf_subscription.c +++ b/lib/sbi/openapi/model/nwdaf_subscription.c @@ -98,6 +98,10 @@ OpenAPI_nwdaf_subscription_t *OpenAPI_nwdaf_subscription_parseFromJSON(cJSON *nw goto end; } nwdaf_events_subscription_local_nonprim = OpenAPI_nnwdaf_events_subscription_parseFromJSON(nwdaf_events_subscription); + if (!nwdaf_events_subscription_local_nonprim) { + ogs_error("OpenAPI_nnwdaf_events_subscription_parseFromJSON failed [nwdaf_events_subscription]"); + goto end; + } nwdaf_subscription_local_var = OpenAPI_nwdaf_subscription_create ( ogs_strdup(nwdaf_evt_subs_service_uri->valuestring), diff --git a/lib/sbi/openapi/model/operator_specific_data_container.c b/lib/sbi/openapi/model/operator_specific_data_container.c index 188fb78fc..7afd54ee9 100644 --- a/lib/sbi/openapi/model/operator_specific_data_container.c +++ b/lib/sbi/openapi/model/operator_specific_data_container.c @@ -180,6 +180,10 @@ OpenAPI_operator_specific_data_container_t *OpenAPI_operator_specific_data_conta goto end; } value_local_nonprim = OpenAPI_operator_specific_data_container_value_parseFromJSON(value); + if (!value_local_nonprim) { + ogs_error("OpenAPI_operator_specific_data_container_value_parseFromJSON failed [value]"); + goto end; + } supported_features = cJSON_GetObjectItemCaseSensitive(operator_specific_data_containerJSON, "supportedFeatures"); if (supported_features) { diff --git a/lib/sbi/openapi/model/out_of_credit_information.c b/lib/sbi/openapi/model/out_of_credit_information.c index 2aab530d9..d49a6033c 100644 --- a/lib/sbi/openapi/model/out_of_credit_information.c +++ b/lib/sbi/openapi/model/out_of_credit_information.c @@ -99,6 +99,10 @@ OpenAPI_out_of_credit_information_t *OpenAPI_out_of_credit_information_parseFrom goto end; } fin_unit_act_local_nonprim = OpenAPI_final_unit_action_parseFromJSON(fin_unit_act); + if (!fin_unit_act_local_nonprim) { + ogs_error("OpenAPI_final_unit_action_parseFromJSON failed [fin_unit_act]"); + goto end; + } flows = cJSON_GetObjectItemCaseSensitive(out_of_credit_informationJSON, "flows"); if (flows) { @@ -118,7 +122,6 @@ OpenAPI_out_of_credit_information_t *OpenAPI_out_of_credit_information_parseFrom OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/parameter_combination.c b/lib/sbi/openapi/model/parameter_combination.c index 62c1e4cb0..a95509a00 100644 --- a/lib/sbi/openapi/model/parameter_combination.c +++ b/lib/sbi/openapi/model/parameter_combination.c @@ -111,6 +111,10 @@ OpenAPI_parameter_combination_t *OpenAPI_parameter_combination_parseFromJSON(cJS snssai = cJSON_GetObjectItemCaseSensitive(parameter_combinationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } parameter_combination_local_var = OpenAPI_parameter_combination_create ( diff --git a/lib/sbi/openapi/model/partial_success_report.c b/lib/sbi/openapi/model/partial_success_report.c index ecd63ea0f..606ac2182 100644 --- a/lib/sbi/openapi/model/partial_success_report.c +++ b/lib/sbi/openapi/model/partial_success_report.c @@ -209,7 +209,6 @@ OpenAPI_partial_success_report_t *OpenAPI_partial_success_report_parseFromJSON(c OpenAPI_rule_report_t *rule_reportsItem = OpenAPI_rule_report_parseFromJSON(rule_reports_local); if (!rule_reportsItem) { ogs_error("No rule_reportsItem"); - OpenAPI_list_free(rule_reportsList); goto end; } OpenAPI_list_add(rule_reportsList, rule_reportsItem); @@ -234,7 +233,6 @@ OpenAPI_partial_success_report_t *OpenAPI_partial_success_report_parseFromJSON(c OpenAPI_session_rule_report_t *sess_rule_reportsItem = OpenAPI_session_rule_report_parseFromJSON(sess_rule_reports_local); if (!sess_rule_reportsItem) { ogs_error("No sess_rule_reportsItem"); - OpenAPI_list_free(sess_rule_reportsList); goto end; } OpenAPI_list_add(sess_rule_reportsList, sess_rule_reportsItem); @@ -244,6 +242,10 @@ OpenAPI_partial_success_report_t *OpenAPI_partial_success_report_parseFromJSON(c ue_camping_rep = cJSON_GetObjectItemCaseSensitive(partial_success_reportJSON, "ueCampingRep"); if (ue_camping_rep) { ue_camping_rep_local_nonprim = OpenAPI_ue_camping_rep_parseFromJSON(ue_camping_rep); + if (!ue_camping_rep_local_nonprim) { + ogs_error("OpenAPI_ue_camping_rep_parseFromJSON failed [ue_camping_rep]"); + goto end; + } } policy_dec_failure_reports = cJSON_GetObjectItemCaseSensitive(partial_success_reportJSON, "policyDecFailureReports"); @@ -283,7 +285,6 @@ OpenAPI_partial_success_report_t *OpenAPI_partial_success_report_parseFromJSON(c OpenAPI_invalid_param_t *invalid_policy_decsItem = OpenAPI_invalid_param_parseFromJSON(invalid_policy_decs_local); if (!invalid_policy_decsItem) { ogs_error("No invalid_policy_decsItem"); - OpenAPI_list_free(invalid_policy_decsList); goto end; } OpenAPI_list_add(invalid_policy_decsList, invalid_policy_decsItem); diff --git a/lib/sbi/openapi/model/patch_result.c b/lib/sbi/openapi/model/patch_result.c index fe37bf2eb..59e96320f 100644 --- a/lib/sbi/openapi/model/patch_result.c +++ b/lib/sbi/openapi/model/patch_result.c @@ -93,7 +93,6 @@ OpenAPI_patch_result_t *OpenAPI_patch_result_parseFromJSON(cJSON *patch_resultJS OpenAPI_report_item_t *reportItem = OpenAPI_report_item_parseFromJSON(report_local); if (!reportItem) { ogs_error("No reportItem"); - OpenAPI_list_free(reportList); goto end; } OpenAPI_list_add(reportList, reportItem); diff --git a/lib/sbi/openapi/model/pc5_qo_s_para.c b/lib/sbi/openapi/model/pc5_qo_s_para.c index c7e4e5499..a6c1c5671 100644 --- a/lib/sbi/openapi/model/pc5_qo_s_para.c +++ b/lib/sbi/openapi/model/pc5_qo_s_para.c @@ -107,7 +107,6 @@ OpenAPI_pc5_qo_s_para_t *OpenAPI_pc5_qo_s_para_parseFromJSON(cJSON *pc5_qo_s_par OpenAPI_pc5_qos_flow_item_t *pc5_qos_flow_listItem = OpenAPI_pc5_qos_flow_item_parseFromJSON(pc5_qos_flow_list_local); if (!pc5_qos_flow_listItem) { ogs_error("No pc5_qos_flow_listItem"); - OpenAPI_list_free(pc5_qos_flow_listList); goto end; } OpenAPI_list_add(pc5_qos_flow_listList, pc5_qos_flow_listItem); diff --git a/lib/sbi/openapi/model/pc5_qos_flow_item.c b/lib/sbi/openapi/model/pc5_qos_flow_item.c index 2a7d2cead..cdce0a44b 100644 --- a/lib/sbi/openapi/model/pc5_qos_flow_item.c +++ b/lib/sbi/openapi/model/pc5_qos_flow_item.c @@ -97,6 +97,10 @@ OpenAPI_pc5_qos_flow_item_t *OpenAPI_pc5_qos_flow_item_parseFromJSON(cJSON *pc5_ pc5_flow_bit_rates = cJSON_GetObjectItemCaseSensitive(pc5_qos_flow_itemJSON, "pc5FlowBitRates"); if (pc5_flow_bit_rates) { pc5_flow_bit_rates_local_nonprim = OpenAPI_pc5_flow_bit_rates_parseFromJSON(pc5_flow_bit_rates); + if (!pc5_flow_bit_rates_local_nonprim) { + ogs_error("OpenAPI_pc5_flow_bit_rates_parseFromJSON failed [pc5_flow_bit_rates]"); + goto end; + } } range = cJSON_GetObjectItemCaseSensitive(pc5_qos_flow_itemJSON, "range"); diff --git a/lib/sbi/openapi/model/pcc_rule.c b/lib/sbi/openapi/model/pcc_rule.c index edfd2305d..fa1fd4d97 100644 --- a/lib/sbi/openapi/model/pcc_rule.c +++ b/lib/sbi/openapi/model/pcc_rule.c @@ -537,7 +537,6 @@ OpenAPI_pcc_rule_t *OpenAPI_pcc_rule_parseFromJSON(cJSON *pcc_ruleJSON) OpenAPI_flow_information_t *flow_infosItem = OpenAPI_flow_information_parseFromJSON(flow_infos_local); if (!flow_infosItem) { ogs_error("No flow_infosItem"); - OpenAPI_list_free(flow_infosList); goto end; } OpenAPI_list_add(flow_infosList, flow_infosItem); @@ -798,11 +797,19 @@ OpenAPI_pcc_rule_t *OpenAPI_pcc_rule_parseFromJSON(cJSON *pcc_ruleJSON) tscai_input_dl = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "tscaiInputDl"); if (tscai_input_dl) { tscai_input_dl_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_dl); + if (!tscai_input_dl_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_dl]"); + goto end; + } } tscai_input_ul = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "tscaiInputUl"); if (tscai_input_ul) { tscai_input_ul_local_nonprim = OpenAPI_tscai_input_container_parseFromJSON(tscai_input_ul); + if (!tscai_input_ul_local_nonprim) { + ogs_error("OpenAPI_tscai_input_container_parseFromJSON failed [tscai_input_ul]"); + goto end; + } } tscai_time_dom = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "tscaiTimeDom"); @@ -816,11 +823,19 @@ OpenAPI_pcc_rule_t *OpenAPI_pcc_rule_parseFromJSON(cJSON *pcc_ruleJSON) dd_notif_ctrl = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "ddNotifCtrl"); if (dd_notif_ctrl) { dd_notif_ctrl_local_nonprim = OpenAPI_downlink_data_notification_control_parseFromJSON(dd_notif_ctrl); + if (!dd_notif_ctrl_local_nonprim) { + ogs_error("OpenAPI_downlink_data_notification_control_parseFromJSON failed [dd_notif_ctrl]"); + goto end; + } } dd_notif_ctrl2 = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "ddNotifCtrl2"); if (dd_notif_ctrl2) { dd_notif_ctrl2_local_nonprim = OpenAPI_downlink_data_notification_control_rm_parseFromJSON(dd_notif_ctrl2); + if (!dd_notif_ctrl2_local_nonprim) { + ogs_error("OpenAPI_downlink_data_notification_control_rm_parseFromJSON failed [dd_notif_ctrl2]"); + goto end; + } } dis_ue_notif = cJSON_GetObjectItemCaseSensitive(pcc_ruleJSON, "disUeNotif"); diff --git a/lib/sbi/openapi/model/pcf_addressing_info.c b/lib/sbi/openapi/model/pcf_addressing_info.c index df8999d53..ba49393d4 100644 --- a/lib/sbi/openapi/model/pcf_addressing_info.c +++ b/lib/sbi/openapi/model/pcf_addressing_info.c @@ -124,7 +124,6 @@ OpenAPI_pcf_addressing_info_t *OpenAPI_pcf_addressing_info_parseFromJSON(cJSON * OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_binding.c b/lib/sbi/openapi/model/pcf_binding.c index f5a0a0823..dd7525e88 100644 --- a/lib/sbi/openapi/model/pcf_binding.c +++ b/lib/sbi/openapi/model/pcf_binding.c @@ -590,7 +590,6 @@ OpenAPI_pcf_binding_t *OpenAPI_pcf_binding_parseFromJSON(cJSON *pcf_bindingJSON) OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); @@ -639,7 +638,6 @@ OpenAPI_pcf_binding_t *OpenAPI_pcf_binding_parseFromJSON(cJSON *pcf_bindingJSON) OpenAPI_ip_end_point_t *pcf_sm_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_sm_ip_end_points_local); if (!pcf_sm_ip_end_pointsItem) { ogs_error("No pcf_sm_ip_end_pointsItem"); - OpenAPI_list_free(pcf_sm_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_sm_ip_end_pointsList, pcf_sm_ip_end_pointsItem); @@ -652,6 +650,10 @@ OpenAPI_pcf_binding_t *OpenAPI_pcf_binding_parseFromJSON(cJSON *pcf_bindingJSON) goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } supp_feat = cJSON_GetObjectItemCaseSensitive(pcf_bindingJSON, "suppFeat"); if (supp_feat) { @@ -688,6 +690,10 @@ OpenAPI_pcf_binding_t *OpenAPI_pcf_binding_parseFromJSON(cJSON *pcf_bindingJSON) para_com = cJSON_GetObjectItemCaseSensitive(pcf_bindingJSON, "paraCom"); if (para_com) { para_com_local_nonprim = OpenAPI_parameter_combination_parseFromJSON(para_com); + if (!para_com_local_nonprim) { + ogs_error("OpenAPI_parameter_combination_parseFromJSON failed [para_com]"); + goto end; + } } bind_level = cJSON_GetObjectItemCaseSensitive(pcf_bindingJSON, "bindLevel"); diff --git a/lib/sbi/openapi/model/pcf_binding_patch.c b/lib/sbi/openapi/model/pcf_binding_patch.c index 3cb8adf65..09fd786d5 100644 --- a/lib/sbi/openapi/model/pcf_binding_patch.c +++ b/lib/sbi/openapi/model/pcf_binding_patch.c @@ -340,7 +340,6 @@ OpenAPI_pcf_binding_patch_t *OpenAPI_pcf_binding_patch_parseFromJSON(cJSON *pcf_ OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_for_pdu_session_info.c b/lib/sbi/openapi/model/pcf_for_pdu_session_info.c index 16f082234..f58fdde94 100644 --- a/lib/sbi/openapi/model/pcf_for_pdu_session_info.c +++ b/lib/sbi/openapi/model/pcf_for_pdu_session_info.c @@ -256,6 +256,10 @@ OpenAPI_pcf_for_pdu_session_info_t *OpenAPI_pcf_for_pdu_session_info_parseFromJS goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } pcf_fqdn = cJSON_GetObjectItemCaseSensitive(pcf_for_pdu_session_infoJSON, "pcfFqdn"); if (pcf_fqdn) { @@ -283,7 +287,6 @@ OpenAPI_pcf_for_pdu_session_info_t *OpenAPI_pcf_for_pdu_session_info_parseFromJS OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_for_ue_binding.c b/lib/sbi/openapi/model/pcf_for_ue_binding.c index f64d8a9e5..fd77ed1d7 100644 --- a/lib/sbi/openapi/model/pcf_for_ue_binding.c +++ b/lib/sbi/openapi/model/pcf_for_ue_binding.c @@ -211,7 +211,6 @@ OpenAPI_pcf_for_ue_binding_t *OpenAPI_pcf_for_ue_binding_parseFromJSON(cJSON *pc OpenAPI_ip_end_point_t *pcf_for_ue_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_for_ue_ip_end_points_local); if (!pcf_for_ue_ip_end_pointsItem) { ogs_error("No pcf_for_ue_ip_end_pointsItem"); - OpenAPI_list_free(pcf_for_ue_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_for_ue_ip_end_pointsList, pcf_for_ue_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_for_ue_binding_patch.c b/lib/sbi/openapi/model/pcf_for_ue_binding_patch.c index 0f83094b7..3ea740e0b 100644 --- a/lib/sbi/openapi/model/pcf_for_ue_binding_patch.c +++ b/lib/sbi/openapi/model/pcf_for_ue_binding_patch.c @@ -124,7 +124,6 @@ OpenAPI_pcf_for_ue_binding_patch_t *OpenAPI_pcf_for_ue_binding_patch_parseFromJS OpenAPI_ip_end_point_t *pcf_for_ue_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_for_ue_ip_end_points_local); if (!pcf_for_ue_ip_end_pointsItem) { ogs_error("No pcf_for_ue_ip_end_pointsItem"); - OpenAPI_list_free(pcf_for_ue_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_for_ue_ip_end_pointsList, pcf_for_ue_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_for_ue_info.c b/lib/sbi/openapi/model/pcf_for_ue_info.c index f5e5c73ca..ad6a707b7 100644 --- a/lib/sbi/openapi/model/pcf_for_ue_info.c +++ b/lib/sbi/openapi/model/pcf_for_ue_info.c @@ -149,7 +149,6 @@ OpenAPI_pcf_for_ue_info_t *OpenAPI_pcf_for_ue_info_parseFromJSON(cJSON *pcf_for_ OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_info.c b/lib/sbi/openapi/model/pcf_info.c index 1133fe909..cb60430dc 100644 --- a/lib/sbi/openapi/model/pcf_info.c +++ b/lib/sbi/openapi/model/pcf_info.c @@ -277,7 +277,6 @@ OpenAPI_pcf_info_t *OpenAPI_pcf_info_parseFromJSON(cJSON *pcf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -302,7 +301,6 @@ OpenAPI_pcf_info_t *OpenAPI_pcf_info_parseFromJSON(cJSON *pcf_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -344,11 +342,19 @@ OpenAPI_pcf_info_t *OpenAPI_pcf_info_parseFromJSON(cJSON *pcf_infoJSON) prose_capability = cJSON_GetObjectItemCaseSensitive(pcf_infoJSON, "proseCapability"); if (prose_capability) { prose_capability_local_nonprim = OpenAPI_pro_se_capability_parseFromJSON(prose_capability); + if (!prose_capability_local_nonprim) { + ogs_error("OpenAPI_pro_se_capability_parseFromJSON failed [prose_capability]"); + goto end; + } } v2x_capability = cJSON_GetObjectItemCaseSensitive(pcf_infoJSON, "v2xCapability"); if (v2x_capability) { v2x_capability_local_nonprim = OpenAPI_v2x_capability_parseFromJSON(v2x_capability); + if (!v2x_capability_local_nonprim) { + ogs_error("OpenAPI_v2x_capability_parseFromJSON failed [v2x_capability]"); + goto end; + } } pcf_info_local_var = OpenAPI_pcf_info_create ( diff --git a/lib/sbi/openapi/model/pcf_mbs_binding.c b/lib/sbi/openapi/model/pcf_mbs_binding.c index 093a9dd56..8b6680cc9 100644 --- a/lib/sbi/openapi/model/pcf_mbs_binding.c +++ b/lib/sbi/openapi/model/pcf_mbs_binding.c @@ -180,6 +180,10 @@ OpenAPI_pcf_mbs_binding_t *OpenAPI_pcf_mbs_binding_parseFromJSON(cJSON *pcf_mbs_ goto end; } mbs_session_id_local_nonprim = OpenAPI_mbs_session_id_parseFromJSON(mbs_session_id); + if (!mbs_session_id_local_nonprim) { + ogs_error("OpenAPI_mbs_session_id_parseFromJSON failed [mbs_session_id]"); + goto end; + } pcf_fqdn = cJSON_GetObjectItemCaseSensitive(pcf_mbs_bindingJSON, "pcfFqdn"); if (pcf_fqdn) { @@ -207,7 +211,6 @@ OpenAPI_pcf_mbs_binding_t *OpenAPI_pcf_mbs_binding_parseFromJSON(cJSON *pcf_mbs_ OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_mbs_binding_patch.c b/lib/sbi/openapi/model/pcf_mbs_binding_patch.c index 6d6582037..2795b0eb5 100644 --- a/lib/sbi/openapi/model/pcf_mbs_binding_patch.c +++ b/lib/sbi/openapi/model/pcf_mbs_binding_patch.c @@ -124,7 +124,6 @@ OpenAPI_pcf_mbs_binding_patch_t *OpenAPI_pcf_mbs_binding_patch_parseFromJSON(cJS OpenAPI_ip_end_point_t *pcf_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(pcf_ip_end_points_local); if (!pcf_ip_end_pointsItem) { ogs_error("No pcf_ip_end_pointsItem"); - OpenAPI_list_free(pcf_ip_end_pointsList); goto end; } OpenAPI_list_add(pcf_ip_end_pointsList, pcf_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/pcf_selection_assistance_info.c b/lib/sbi/openapi/model/pcf_selection_assistance_info.c index 6e921dd9b..c80b443da 100644 --- a/lib/sbi/openapi/model/pcf_selection_assistance_info.c +++ b/lib/sbi/openapi/model/pcf_selection_assistance_info.c @@ -98,6 +98,10 @@ OpenAPI_pcf_selection_assistance_info_t *OpenAPI_pcf_selection_assistance_info_p goto end; } single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } pcf_selection_assistance_info_local_var = OpenAPI_pcf_selection_assistance_info_create ( ogs_strdup(dnn->valuestring), diff --git a/lib/sbi/openapi/model/pcf_selection_assistance_info_1.c b/lib/sbi/openapi/model/pcf_selection_assistance_info_1.c index 33532b9ab..0eb95ed81 100644 --- a/lib/sbi/openapi/model/pcf_selection_assistance_info_1.c +++ b/lib/sbi/openapi/model/pcf_selection_assistance_info_1.c @@ -98,6 +98,10 @@ OpenAPI_pcf_selection_assistance_info_1_t *OpenAPI_pcf_selection_assistance_info goto end; } single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } pcf_selection_assistance_info_1_local_var = OpenAPI_pcf_selection_assistance_info_1_create ( ogs_strdup(dnn->valuestring), diff --git a/lib/sbi/openapi/model/pcscf_info.c b/lib/sbi/openapi/model/pcscf_info.c index 22ccfd652..01dfa4ab6 100644 --- a/lib/sbi/openapi/model/pcscf_info.c +++ b/lib/sbi/openapi/model/pcscf_info.c @@ -430,7 +430,6 @@ OpenAPI_pcscf_info_t *OpenAPI_pcscf_info_parseFromJSON(cJSON *pcscf_infoJSON) OpenAPI_ipv4_address_range_t *served_ipv4_address_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(served_ipv4_address_ranges_local); if (!served_ipv4_address_rangesItem) { ogs_error("No served_ipv4_address_rangesItem"); - OpenAPI_list_free(served_ipv4_address_rangesList); goto end; } OpenAPI_list_add(served_ipv4_address_rangesList, served_ipv4_address_rangesItem); @@ -455,7 +454,6 @@ OpenAPI_pcscf_info_t *OpenAPI_pcscf_info_parseFromJSON(cJSON *pcscf_infoJSON) OpenAPI_ipv6_prefix_range_t *served_ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(served_ipv6_prefix_ranges_local); if (!served_ipv6_prefix_rangesItem) { ogs_error("No served_ipv6_prefix_rangesItem"); - OpenAPI_list_free(served_ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(served_ipv6_prefix_rangesList, served_ipv6_prefix_rangesItem); diff --git a/lib/sbi/openapi/model/pcscf_restoration_notification.c b/lib/sbi/openapi/model/pcscf_restoration_notification.c index 057dff942..155a45a1a 100644 --- a/lib/sbi/openapi/model/pcscf_restoration_notification.c +++ b/lib/sbi/openapi/model/pcscf_restoration_notification.c @@ -93,6 +93,10 @@ OpenAPI_pcscf_restoration_notification_t *OpenAPI_pcscf_restoration_notification failed_pcscf = cJSON_GetObjectItemCaseSensitive(pcscf_restoration_notificationJSON, "failedPcscf"); if (failed_pcscf) { failed_pcscf_local_nonprim = OpenAPI_pcscf_address_parseFromJSON(failed_pcscf); + if (!failed_pcscf_local_nonprim) { + ogs_error("OpenAPI_pcscf_address_parseFromJSON failed [failed_pcscf]"); + goto end; + } } pcscf_restoration_notification_local_var = OpenAPI_pcscf_restoration_notification_create ( diff --git a/lib/sbi/openapi/model/pcscf_restoration_request_data.c b/lib/sbi/openapi/model/pcscf_restoration_request_data.c index e706bf084..c26cc4ac6 100644 --- a/lib/sbi/openapi/model/pcscf_restoration_request_data.c +++ b/lib/sbi/openapi/model/pcscf_restoration_request_data.c @@ -153,6 +153,10 @@ OpenAPI_pcscf_restoration_request_data_t *OpenAPI_pcscf_restoration_request_data slice_info = cJSON_GetObjectItemCaseSensitive(pcscf_restoration_request_dataJSON, "sliceInfo"); if (slice_info) { slice_info_local_nonprim = OpenAPI_snssai_parseFromJSON(slice_info); + if (!slice_info_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [slice_info]"); + goto end; + } } supi = cJSON_GetObjectItemCaseSensitive(pcscf_restoration_request_dataJSON, "supi"); diff --git a/lib/sbi/openapi/model/pdu_session.c b/lib/sbi/openapi/model/pdu_session.c index b329bbf6e..739727aa3 100644 --- a/lib/sbi/openapi/model/pdu_session.c +++ b/lib/sbi/openapi/model/pdu_session.c @@ -145,10 +145,18 @@ OpenAPI_pdu_session_t *OpenAPI_pdu_session_parseFromJSON(cJSON *pdu_sessionJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } single_nssai = cJSON_GetObjectItemCaseSensitive(pdu_sessionJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } pdu_session_local_var = OpenAPI_pdu_session_create ( diff --git a/lib/sbi/openapi/model/pdu_session_context.c b/lib/sbi/openapi/model/pdu_session_context.c index cc36909f2..39f5626c5 100644 --- a/lib/sbi/openapi/model/pdu_session_context.c +++ b/lib/sbi/openapi/model/pdu_session_context.c @@ -618,6 +618,10 @@ OpenAPI_pdu_session_context_t *OpenAPI_pdu_session_context_parseFromJSON(cJSON * goto end; } s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "dnn"); if (!dnn) { @@ -675,7 +679,6 @@ OpenAPI_pdu_session_context_t *OpenAPI_pdu_session_context_parseFromJSON(cJSON * OpenAPI_ebi_arp_mapping_t *allocated_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(allocated_ebi_list_local); if (!allocated_ebi_listItem) { ogs_error("No allocated_ebi_listItem"); - OpenAPI_list_free(allocated_ebi_listList); goto end; } OpenAPI_list_add(allocated_ebi_listList, allocated_ebi_listItem); @@ -808,6 +811,10 @@ OpenAPI_pdu_session_context_t *OpenAPI_pdu_session_context_parseFromJSON(cJSON * cn_assisted_ran_para = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "cnAssistedRanPara"); if (cn_assisted_ran_para) { cn_assisted_ran_para_local_nonprim = OpenAPI_cn_assisted_ran_para_parseFromJSON(cn_assisted_ran_para); + if (!cn_assisted_ran_para_local_nonprim) { + ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON failed [cn_assisted_ran_para]"); + goto end; + } } nrf_management_uri = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "nrfManagementUri"); @@ -861,6 +868,10 @@ OpenAPI_pdu_session_context_t *OpenAPI_pdu_session_context_parseFromJSON(cJSON * additional_snssai = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "additionalSnssai"); if (additional_snssai) { additional_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(additional_snssai); + if (!additional_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [additional_snssai]"); + goto end; + } } inter_plmn_api_root = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "interPlmnApiRoot"); @@ -882,11 +893,19 @@ OpenAPI_pdu_session_context_t *OpenAPI_pdu_session_context_parseFromJSON(cJSON * pgw_ip_addr = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "pgwIpAddr"); if (pgw_ip_addr) { pgw_ip_addr_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_addr); + if (!pgw_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [pgw_ip_addr]"); + goto end; + } } plmn_id = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } anchor_smf_supported_features = cJSON_GetObjectItemCaseSensitive(pdu_session_contextJSON, "anchorSmfSupportedFeatures"); diff --git a/lib/sbi/openapi/model/pdu_session_create_data.c b/lib/sbi/openapi/model/pdu_session_create_data.c index b65ceef2f..92eee59dc 100644 --- a/lib/sbi/openapi/model/pdu_session_create_data.c +++ b/lib/sbi/openapi/model/pdu_session_create_data.c @@ -1243,11 +1243,19 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON s_nssai = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } hplmn_snssai = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "hplmnSnssai"); if (hplmn_snssai) { hplmn_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(hplmn_snssai); + if (!hplmn_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [hplmn_snssai]"); + goto end; + } } vsmf_id = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "vsmfId"); @@ -1272,6 +1280,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON goto end; } serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } request_type = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "requestType"); if (request_type) { @@ -1336,21 +1348,37 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON vcn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "vcnTunnelInfo"); if (vcn_tunnel_info) { vcn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(vcn_tunnel_info); + if (!vcn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [vcn_tunnel_info]"); + goto end; + } } icn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "icnTunnelInfo"); if (icn_tunnel_info) { icn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(icn_tunnel_info); + if (!icn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [icn_tunnel_info]"); + goto end; + } } n9_forwarding_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "n9ForwardingTunnelInfo"); if (n9_forwarding_tunnel_info) { n9_forwarding_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(n9_forwarding_tunnel_info); + if (!n9_forwarding_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [n9_forwarding_tunnel_info]"); + goto end; + } } additional_cn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "additionalCnTunnelInfo"); if (additional_cn_tunnel_info) { additional_cn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(additional_cn_tunnel_info); + if (!additional_cn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [additional_cn_tunnel_info]"); + goto end; + } } an_type = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "anType"); @@ -1385,6 +1413,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON ue_location = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "ueTimeZone"); @@ -1398,6 +1430,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON add_ue_location = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } gpsi = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "gpsi"); @@ -1411,11 +1447,19 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON n1_sm_info_from_ue = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "n1SmInfoFromUe"); if (n1_sm_info_from_ue) { n1_sm_info_from_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_from_ue); + if (!n1_sm_info_from_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_from_ue]"); + goto end; + } } unknown_n1_sm_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "unknownN1SmInfo"); if (unknown_n1_sm_info) { unknown_n1_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(unknown_n1_sm_info); + if (!unknown_n1_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [unknown_n1_sm_info]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "supportedFeatures"); @@ -1543,6 +1587,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON roaming_charging_profile = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "roamingChargingProfile"); if (roaming_charging_profile) { roaming_charging_profile_local_nonprim = OpenAPI_roaming_charging_profile_parseFromJSON(roaming_charging_profile); + if (!roaming_charging_profile_local_nonprim) { + ogs_error("OpenAPI_roaming_charging_profile_parseFromJSON failed [roaming_charging_profile]"); + goto end; + } } charging_id = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "chargingId"); @@ -1580,6 +1628,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON guami = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } max_integrity_protected_data_rate_ul = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "maxIntegrityProtectedDataRateUl"); @@ -1688,7 +1740,6 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON OpenAPI_secondary_rat_usage_info_t *secondary_rat_usage_infoItem = OpenAPI_secondary_rat_usage_info_parseFromJSON(secondary_rat_usage_info_local); if (!secondary_rat_usage_infoItem) { ogs_error("No secondary_rat_usage_infoItem"); - OpenAPI_list_free(secondary_rat_usage_infoList); goto end; } OpenAPI_list_add(secondary_rat_usage_infoList, secondary_rat_usage_infoItem); @@ -1698,11 +1749,19 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON small_data_rate_status = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } dl_serving_plmn_rate_ctl = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "dlServingPlmnRateCtl"); @@ -1716,11 +1775,19 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON up_security_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "upSecurityInfo"); if (up_security_info) { up_security_info_local_nonprim = OpenAPI_up_security_info_parseFromJSON(up_security_info); + if (!up_security_info_local_nonprim) { + ogs_error("OpenAPI_up_security_info_parseFromJSON failed [up_security_info]"); + goto end; + } } vplmn_qos = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "vplmnQos"); if (vplmn_qos) { vplmn_qos_local_nonprim = OpenAPI_vplmn_qos_parseFromJSON(vplmn_qos); + if (!vplmn_qos_local_nonprim) { + ogs_error("OpenAPI_vplmn_qos_parseFromJSON failed [vplmn_qos]"); + goto end; + } } old_sm_context_ref = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "oldSmContextRef"); @@ -1734,6 +1801,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON redundant_pdu_session_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "redundantPduSessionInfo"); if (redundant_pdu_session_info) { redundant_pdu_session_info_local_nonprim = OpenAPI_redundant_pdu_session_information_parseFromJSON(redundant_pdu_session_info); + if (!redundant_pdu_session_info_local_nonprim) { + ogs_error("OpenAPI_redundant_pdu_session_information_parseFromJSON failed [redundant_pdu_session_info]"); + goto end; + } } old_pdu_session_ref = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "oldPduSessionRef"); @@ -1755,6 +1826,10 @@ OpenAPI_pdu_session_create_data_t *OpenAPI_pdu_session_create_data_parseFromJSON pcf_ue_callback_info = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "pcfUeCallbackInfo"); if (pcf_ue_callback_info) { pcf_ue_callback_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_callback_info); + if (!pcf_ue_callback_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_callback_info]"); + goto end; + } } satellite_backhaul_cat = cJSON_GetObjectItemCaseSensitive(pdu_session_create_dataJSON, "satelliteBackhaulCat"); diff --git a/lib/sbi/openapi/model/pdu_session_create_error.c b/lib/sbi/openapi/model/pdu_session_create_error.c index fb854bd5b..df304306c 100644 --- a/lib/sbi/openapi/model/pdu_session_create_error.c +++ b/lib/sbi/openapi/model/pdu_session_create_error.c @@ -133,6 +133,10 @@ OpenAPI_pdu_session_create_error_t *OpenAPI_pdu_session_create_error_parseFromJS goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } n1sm_cause = cJSON_GetObjectItemCaseSensitive(pdu_session_create_errorJSON, "n1smCause"); if (n1sm_cause) { @@ -145,6 +149,10 @@ OpenAPI_pdu_session_create_error_t *OpenAPI_pdu_session_create_error_parseFromJS n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(pdu_session_create_errorJSON, "n1SmInfoToUe"); if (n1_sm_info_to_ue) { n1_sm_info_to_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_to_ue); + if (!n1_sm_info_to_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_to_ue]"); + goto end; + } } back_off_timer = cJSON_GetObjectItemCaseSensitive(pdu_session_create_errorJSON, "backOffTimer"); diff --git a/lib/sbi/openapi/model/pdu_session_created_data.c b/lib/sbi/openapi/model/pdu_session_created_data.c index 5fb865289..173e76951 100644 --- a/lib/sbi/openapi/model/pdu_session_created_data.c +++ b/lib/sbi/openapi/model/pdu_session_created_data.c @@ -718,21 +718,37 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS hcn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "hcnTunnelInfo"); if (hcn_tunnel_info) { hcn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(hcn_tunnel_info); + if (!hcn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [hcn_tunnel_info]"); + goto end; + } } cn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "cnTunnelInfo"); if (cn_tunnel_info) { cn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(cn_tunnel_info); + if (!cn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [cn_tunnel_info]"); + goto end; + } } additional_cn_tunnel_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "additionalCnTunnelInfo"); if (additional_cn_tunnel_info) { additional_cn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(additional_cn_tunnel_info); + if (!additional_cn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [additional_cn_tunnel_info]"); + goto end; + } } session_ambr = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } } qos_flows_setup_list = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "qosFlowsSetupList"); @@ -753,7 +769,6 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS OpenAPI_qos_flow_setup_item_t *qos_flows_setup_listItem = OpenAPI_qos_flow_setup_item_parseFromJSON(qos_flows_setup_list_local); if (!qos_flows_setup_listItem) { ogs_error("No qos_flows_setup_listItem"); - OpenAPI_list_free(qos_flows_setup_listList); goto end; } OpenAPI_list_add(qos_flows_setup_listList, qos_flows_setup_listItem); @@ -787,6 +802,10 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS s_nssai = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } enable_pause_charging = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "enablePauseCharging"); @@ -816,11 +835,19 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "n1SmInfoToUe"); if (n1_sm_info_to_ue) { n1_sm_info_to_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_to_ue); + if (!n1_sm_info_to_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_to_ue]"); + goto end; + } } eps_pdn_cnx_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "epsPdnCnxInfo"); if (eps_pdn_cnx_info) { eps_pdn_cnx_info_local_nonprim = OpenAPI_eps_pdn_cnx_info_parseFromJSON(eps_pdn_cnx_info); + if (!eps_pdn_cnx_info_local_nonprim) { + ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON failed [eps_pdn_cnx_info]"); + goto end; + } } eps_bearer_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "epsBearerInfo"); @@ -841,7 +868,6 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS OpenAPI_eps_bearer_info_t *eps_bearer_infoItem = OpenAPI_eps_bearer_info_parseFromJSON(eps_bearer_info_local); if (!eps_bearer_infoItem) { ogs_error("No eps_bearer_infoItem"); - OpenAPI_list_free(eps_bearer_infoList); goto end; } OpenAPI_list_add(eps_bearer_infoList, eps_bearer_infoItem); @@ -893,11 +919,19 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS up_security = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "upSecurity"); if (up_security) { up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_parseFromJSON failed [up_security]"); + goto end; + } } roaming_charging_profile = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "roamingChargingProfile"); if (roaming_charging_profile) { roaming_charging_profile_local_nonprim = OpenAPI_roaming_charging_profile_parseFromJSON(roaming_charging_profile); + if (!roaming_charging_profile_local_nonprim) { + ogs_error("OpenAPI_roaming_charging_profile_parseFromJSON failed [roaming_charging_profile]"); + goto end; + } } h_smf_service_instance_id = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "hSmfServiceInstanceId"); @@ -1004,11 +1038,19 @@ OpenAPI_pdu_session_created_data_t *OpenAPI_pdu_session_created_data_parseFromJS dn_aaa_address = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "dnAaaAddress"); if (dn_aaa_address) { dn_aaa_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(dn_aaa_address); + if (!dn_aaa_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [dn_aaa_address]"); + goto end; + } } redundant_pdu_session_info = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "redundantPduSessionInfo"); if (redundant_pdu_session_info) { redundant_pdu_session_info_local_nonprim = OpenAPI_redundant_pdu_session_information_parseFromJSON(redundant_pdu_session_info); + if (!redundant_pdu_session_info_local_nonprim) { + ogs_error("OpenAPI_redundant_pdu_session_information_parseFromJSON failed [redundant_pdu_session_info]"); + goto end; + } } nspu_support_ind = cJSON_GetObjectItemCaseSensitive(pdu_session_created_dataJSON, "nspuSupportInd"); diff --git a/lib/sbi/openapi/model/pdu_session_event_notification.c b/lib/sbi/openapi/model/pdu_session_event_notification.c index 36a6c6c38..2aefeeb5a 100644 --- a/lib/sbi/openapi/model/pdu_session_event_notification.c +++ b/lib/sbi/openapi/model/pdu_session_event_notification.c @@ -209,6 +209,10 @@ OpenAPI_pdu_session_event_notification_t *OpenAPI_pdu_session_event_notification goto end; } ev_notif_local_nonprim = OpenAPI_af_event_notification_parseFromJSON(ev_notif); + if (!ev_notif_local_nonprim) { + ogs_error("OpenAPI_af_event_notification_parseFromJSON failed [ev_notif]"); + goto end; + } supi = cJSON_GetObjectItemCaseSensitive(pdu_session_event_notificationJSON, "supi"); if (supi) { @@ -254,6 +258,10 @@ OpenAPI_pdu_session_event_notification_t *OpenAPI_pdu_session_event_notification pcf_info = cJSON_GetObjectItemCaseSensitive(pdu_session_event_notificationJSON, "pcfInfo"); if (pcf_info) { pcf_info_local_nonprim = OpenAPI_pcf_addressing_info_parseFromJSON(pcf_info); + if (!pcf_info_local_nonprim) { + ogs_error("OpenAPI_pcf_addressing_info_parseFromJSON failed [pcf_info]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(pdu_session_event_notificationJSON, "dnn"); @@ -267,6 +275,10 @@ OpenAPI_pdu_session_event_notification_t *OpenAPI_pdu_session_event_notification snssai = cJSON_GetObjectItemCaseSensitive(pdu_session_event_notificationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } gpsi = cJSON_GetObjectItemCaseSensitive(pdu_session_event_notificationJSON, "gpsi"); diff --git a/lib/sbi/openapi/model/pdu_session_info.c b/lib/sbi/openapi/model/pdu_session_info.c index 1c48c0bfe..783fd56d3 100644 --- a/lib/sbi/openapi/model/pdu_session_info.c +++ b/lib/sbi/openapi/model/pdu_session_info.c @@ -88,6 +88,10 @@ OpenAPI_pdu_session_info_t *OpenAPI_pdu_session_info_parseFromJSON(cJSON *pdu_se goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(pdu_session_infoJSON, "dnn"); if (!dnn) { diff --git a/lib/sbi/openapi/model/pdu_session_management_data.c b/lib/sbi/openapi/model/pdu_session_management_data.c index ea6d228d5..66285e441 100644 --- a/lib/sbi/openapi/model/pdu_session_management_data.c +++ b/lib/sbi/openapi/model/pdu_session_management_data.c @@ -342,7 +342,6 @@ OpenAPI_pdu_session_management_data_t *OpenAPI_pdu_session_management_data_parse OpenAPI_route_to_location_t *n6_traffic_routing_infoItem = OpenAPI_route_to_location_parseFromJSON(n6_traffic_routing_info_local); if (!n6_traffic_routing_infoItem) { ogs_error("No n6_traffic_routing_infoItem"); - OpenAPI_list_free(n6_traffic_routing_infoList); goto end; } OpenAPI_list_add(n6_traffic_routing_infoList, n6_traffic_routing_infoItem); diff --git a/lib/sbi/openapi/model/pdu_session_tsn_bridge.c b/lib/sbi/openapi/model/pdu_session_tsn_bridge.c index 72d44f48b..b3b010f37 100644 --- a/lib/sbi/openapi/model/pdu_session_tsn_bridge.c +++ b/lib/sbi/openapi/model/pdu_session_tsn_bridge.c @@ -218,15 +218,27 @@ OpenAPI_pdu_session_tsn_bridge_t *OpenAPI_pdu_session_tsn_bridge_parseFromJSON(c goto end; } tsn_bridge_info_local_nonprim = OpenAPI_tsn_bridge_info_parseFromJSON(tsn_bridge_info); + if (!tsn_bridge_info_local_nonprim) { + ogs_error("OpenAPI_tsn_bridge_info_parseFromJSON failed [tsn_bridge_info]"); + goto end; + } tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(pdu_session_tsn_bridgeJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(pdu_session_tsn_bridgeJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(pdu_session_tsn_bridgeJSON, "tsnPortManContNwtts"); @@ -247,7 +259,6 @@ OpenAPI_pdu_session_tsn_bridge_t *OpenAPI_pdu_session_tsn_bridge_parseFromJSON(c OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); @@ -273,6 +284,10 @@ OpenAPI_pdu_session_tsn_bridge_t *OpenAPI_pdu_session_tsn_bridge_parseFromJSON(c snssai = cJSON_GetObjectItemCaseSensitive(pdu_session_tsn_bridgeJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } ip_domain = cJSON_GetObjectItemCaseSensitive(pdu_session_tsn_bridgeJSON, "ipDomain"); diff --git a/lib/sbi/openapi/model/pfd_change_notification.c b/lib/sbi/openapi/model/pfd_change_notification.c index c5a79b205..aea14e25c 100644 --- a/lib/sbi/openapi/model/pfd_change_notification.c +++ b/lib/sbi/openapi/model/pfd_change_notification.c @@ -154,7 +154,6 @@ OpenAPI_pfd_change_notification_t *OpenAPI_pfd_change_notification_parseFromJSON OpenAPI_pfd_content_t *pfdsItem = OpenAPI_pfd_content_parseFromJSON(pfds_local); if (!pfdsItem) { ogs_error("No pfdsItem"); - OpenAPI_list_free(pfdsList); goto end; } OpenAPI_list_add(pfdsList, pfdsItem); diff --git a/lib/sbi/openapi/model/pfd_content.c b/lib/sbi/openapi/model/pfd_content.c index 84fb3ba5a..afa7341c1 100644 --- a/lib/sbi/openapi/model/pfd_content.c +++ b/lib/sbi/openapi/model/pfd_content.c @@ -227,6 +227,10 @@ OpenAPI_pfd_content_t *OpenAPI_pfd_content_parseFromJSON(cJSON *pfd_contentJSON) dn_protocol = cJSON_GetObjectItemCaseSensitive(pfd_contentJSON, "dnProtocol"); if (dn_protocol) { dn_protocol_local_nonprim = OpenAPI_domain_name_protocol_parseFromJSON(dn_protocol); + if (!dn_protocol_local_nonprim) { + ogs_error("OpenAPI_domain_name_protocol_parseFromJSON failed [dn_protocol]"); + goto end; + } } pfd_content_local_var = OpenAPI_pfd_content_create ( diff --git a/lib/sbi/openapi/model/pfd_data_for_app_ext.c b/lib/sbi/openapi/model/pfd_data_for_app_ext.c index b94485a96..28ffc5bbe 100644 --- a/lib/sbi/openapi/model/pfd_data_for_app_ext.c +++ b/lib/sbi/openapi/model/pfd_data_for_app_ext.c @@ -184,7 +184,6 @@ OpenAPI_pfd_data_for_app_ext_t *OpenAPI_pfd_data_for_app_ext_parseFromJSON(cJSON OpenAPI_pfd_content_t *pfdsItem = OpenAPI_pfd_content_parseFromJSON(pfds_local); if (!pfdsItem) { ogs_error("No pfdsItem"); - OpenAPI_list_free(pfdsList); goto end; } OpenAPI_list_add(pfdsList, pfdsItem); diff --git a/lib/sbi/openapi/model/pgw_info.c b/lib/sbi/openapi/model/pgw_info.c index de720df46..28b59ea5a 100644 --- a/lib/sbi/openapi/model/pgw_info.c +++ b/lib/sbi/openapi/model/pgw_info.c @@ -180,11 +180,19 @@ OpenAPI_pgw_info_t *OpenAPI_pgw_info_parseFromJSON(cJSON *pgw_infoJSON) pgw_ip_addr = cJSON_GetObjectItemCaseSensitive(pgw_infoJSON, "pgwIpAddr"); if (pgw_ip_addr) { pgw_ip_addr_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_addr); + if (!pgw_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [pgw_ip_addr]"); + goto end; + } } plmn_id = cJSON_GetObjectItemCaseSensitive(pgw_infoJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } epdg_ind = cJSON_GetObjectItemCaseSensitive(pgw_infoJSON, "epdgInd"); diff --git a/lib/sbi/openapi/model/plmn_ec_info.c b/lib/sbi/openapi/model/plmn_ec_info.c index 5be194e1a..8568b32b1 100644 --- a/lib/sbi/openapi/model/plmn_ec_info.c +++ b/lib/sbi/openapi/model/plmn_ec_info.c @@ -105,10 +105,18 @@ OpenAPI_plmn_ec_info_t *OpenAPI_plmn_ec_info_parseFromJSON(cJSON *plmn_ec_infoJS goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(plmn_ec_infoJSON, "ecRestrictionDataWb"); if (ec_restriction_data_wb) { ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb); + if (!ec_restriction_data_wb_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON failed [ec_restriction_data_wb]"); + goto end; + } } ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(plmn_ec_infoJSON, "ecRestrictionDataNb"); diff --git a/lib/sbi/openapi/model/plmn_ec_info_1.c b/lib/sbi/openapi/model/plmn_ec_info_1.c index e8920ddd6..f9885b4c5 100644 --- a/lib/sbi/openapi/model/plmn_ec_info_1.c +++ b/lib/sbi/openapi/model/plmn_ec_info_1.c @@ -105,10 +105,18 @@ OpenAPI_plmn_ec_info_1_t *OpenAPI_plmn_ec_info_1_parseFromJSON(cJSON *plmn_ec_in goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(plmn_ec_info_1JSON, "ecRestrictionDataWb"); if (ec_restriction_data_wb) { ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb); + if (!ec_restriction_data_wb_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON failed [ec_restriction_data_wb]"); + goto end; + } } ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(plmn_ec_info_1JSON, "ecRestrictionDataNb"); diff --git a/lib/sbi/openapi/model/plmn_oauth2.c b/lib/sbi/openapi/model/plmn_oauth2.c index cb41bf9a7..1fd561e54 100644 --- a/lib/sbi/openapi/model/plmn_oauth2.c +++ b/lib/sbi/openapi/model/plmn_oauth2.c @@ -115,7 +115,6 @@ OpenAPI_plmn_oauth2_t *OpenAPI_plmn_oauth2_parseFromJSON(cJSON *plmn_oauth2JSON) OpenAPI_plmn_id_t *oauth2_required_plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(oauth2_required_plmn_id_list_local); if (!oauth2_required_plmn_id_listItem) { ogs_error("No oauth2_required_plmn_id_listItem"); - OpenAPI_list_free(oauth2_required_plmn_id_listList); goto end; } OpenAPI_list_add(oauth2_required_plmn_id_listList, oauth2_required_plmn_id_listItem); @@ -140,7 +139,6 @@ OpenAPI_plmn_oauth2_t *OpenAPI_plmn_oauth2_parseFromJSON(cJSON *plmn_oauth2JSON) OpenAPI_plmn_id_t *oauth2_not_required_plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(oauth2_not_required_plmn_id_list_local); if (!oauth2_not_required_plmn_id_listItem) { ogs_error("No oauth2_not_required_plmn_id_listItem"); - OpenAPI_list_free(oauth2_not_required_plmn_id_listList); goto end; } OpenAPI_list_add(oauth2_not_required_plmn_id_listList, oauth2_not_required_plmn_id_listItem); diff --git a/lib/sbi/openapi/model/plmn_restriction.c b/lib/sbi/openapi/model/plmn_restriction.c index 323a22ec3..8acca538c 100644 --- a/lib/sbi/openapi/model/plmn_restriction.c +++ b/lib/sbi/openapi/model/plmn_restriction.c @@ -216,7 +216,6 @@ OpenAPI_plmn_restriction_t *OpenAPI_plmn_restriction_parseFromJSON(cJSON *plmn_r OpenAPI_area_t *forbidden_areasItem = OpenAPI_area_parseFromJSON(forbidden_areas_local); if (!forbidden_areasItem) { ogs_error("No forbidden_areasItem"); - OpenAPI_list_free(forbidden_areasList); goto end; } OpenAPI_list_add(forbidden_areasList, forbidden_areasItem); @@ -226,6 +225,10 @@ OpenAPI_plmn_restriction_t *OpenAPI_plmn_restriction_parseFromJSON(cJSON *plmn_r service_area_restriction = cJSON_GetObjectItemCaseSensitive(plmn_restrictionJSON, "serviceAreaRestriction"); if (service_area_restriction) { service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(service_area_restriction); + if (!service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [service_area_restriction]"); + goto end; + } } core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(plmn_restrictionJSON, "coreNetworkTypeRestrictions"); diff --git a/lib/sbi/openapi/model/plmn_restriction_1.c b/lib/sbi/openapi/model/plmn_restriction_1.c index 4ef5c8391..6391b2fd4 100644 --- a/lib/sbi/openapi/model/plmn_restriction_1.c +++ b/lib/sbi/openapi/model/plmn_restriction_1.c @@ -216,7 +216,6 @@ OpenAPI_plmn_restriction_1_t *OpenAPI_plmn_restriction_1_parseFromJSON(cJSON *pl OpenAPI_area_1_t *forbidden_areasItem = OpenAPI_area_1_parseFromJSON(forbidden_areas_local); if (!forbidden_areasItem) { ogs_error("No forbidden_areasItem"); - OpenAPI_list_free(forbidden_areasList); goto end; } OpenAPI_list_add(forbidden_areasList, forbidden_areasItem); @@ -226,6 +225,10 @@ OpenAPI_plmn_restriction_1_t *OpenAPI_plmn_restriction_1_parseFromJSON(cJSON *pl service_area_restriction = cJSON_GetObjectItemCaseSensitive(plmn_restriction_1JSON, "serviceAreaRestriction"); if (service_area_restriction) { service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_1_parseFromJSON(service_area_restriction); + if (!service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_1_parseFromJSON failed [service_area_restriction]"); + goto end; + } } core_network_type_restrictions = cJSON_GetObjectItemCaseSensitive(plmn_restriction_1JSON, "coreNetworkTypeRestrictions"); diff --git a/lib/sbi/openapi/model/plmn_route_selection_descriptor.c b/lib/sbi/openapi/model/plmn_route_selection_descriptor.c index 3e2d697e0..266996576 100644 --- a/lib/sbi/openapi/model/plmn_route_selection_descriptor.c +++ b/lib/sbi/openapi/model/plmn_route_selection_descriptor.c @@ -99,6 +99,10 @@ OpenAPI_plmn_route_selection_descriptor_t *OpenAPI_plmn_route_selection_descript goto end; } serving_plmn_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(serving_plmn); + if (!serving_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [serving_plmn]"); + goto end; + } snssai_route_sel_descs = cJSON_GetObjectItemCaseSensitive(plmn_route_selection_descriptorJSON, "snssaiRouteSelDescs"); if (snssai_route_sel_descs) { @@ -118,7 +122,6 @@ OpenAPI_plmn_route_selection_descriptor_t *OpenAPI_plmn_route_selection_descript OpenAPI_snssai_route_selection_descriptor_t *snssai_route_sel_descsItem = OpenAPI_snssai_route_selection_descriptor_parseFromJSON(snssai_route_sel_descs_local); if (!snssai_route_sel_descsItem) { ogs_error("No snssai_route_sel_descsItem"); - OpenAPI_list_free(snssai_route_sel_descsList); goto end; } OpenAPI_list_add(snssai_route_sel_descsList, snssai_route_sel_descsItem); diff --git a/lib/sbi/openapi/model/plmn_snssai.c b/lib/sbi/openapi/model/plmn_snssai.c index 603e2612e..5855a2cd1 100644 --- a/lib/sbi/openapi/model/plmn_snssai.c +++ b/lib/sbi/openapi/model/plmn_snssai.c @@ -115,6 +115,10 @@ OpenAPI_plmn_snssai_t *OpenAPI_plmn_snssai_parseFromJSON(cJSON *plmn_snssaiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } s_nssai_list = cJSON_GetObjectItemCaseSensitive(plmn_snssaiJSON, "sNssaiList"); if (!s_nssai_list) { @@ -137,7 +141,6 @@ OpenAPI_plmn_snssai_t *OpenAPI_plmn_snssai_parseFromJSON(cJSON *plmn_snssaiJSON) OpenAPI_ext_snssai_t *s_nssai_listItem = OpenAPI_ext_snssai_parseFromJSON(s_nssai_list_local); if (!s_nssai_listItem) { ogs_error("No s_nssai_listItem"); - OpenAPI_list_free(s_nssai_listList); goto end; } OpenAPI_list_add(s_nssai_listList, s_nssai_listItem); diff --git a/lib/sbi/openapi/model/point.c b/lib/sbi/openapi/model/point.c index acd2144f2..29e4249f0 100644 --- a/lib/sbi/openapi/model/point.c +++ b/lib/sbi/openapi/model/point.c @@ -95,6 +95,10 @@ OpenAPI_point_t *OpenAPI_point_parseFromJSON(cJSON *pointJSON) goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(pointJSON, "point"); if (!point) { @@ -102,6 +106,10 @@ OpenAPI_point_t *OpenAPI_point_parseFromJSON(cJSON *pointJSON) goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } point_local_var = OpenAPI_point_create ( shape_local_nonprim, diff --git a/lib/sbi/openapi/model/point_all_of.c b/lib/sbi/openapi/model/point_all_of.c index ddc3cabce..d76c4c22a 100644 --- a/lib/sbi/openapi/model/point_all_of.c +++ b/lib/sbi/openapi/model/point_all_of.c @@ -72,6 +72,10 @@ OpenAPI_point_all_of_t *OpenAPI_point_all_of_parseFromJSON(cJSON *point_all_ofJS goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } point_all_of_local_var = OpenAPI_point_all_of_create ( point_local_nonprim diff --git a/lib/sbi/openapi/model/point_altitude.c b/lib/sbi/openapi/model/point_altitude.c index c924da9f7..8f923c039 100644 --- a/lib/sbi/openapi/model/point_altitude.c +++ b/lib/sbi/openapi/model/point_altitude.c @@ -103,6 +103,10 @@ OpenAPI_point_altitude_t *OpenAPI_point_altitude_parseFromJSON(cJSON *point_alti goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(point_altitudeJSON, "point"); if (!point) { @@ -110,6 +114,10 @@ OpenAPI_point_altitude_t *OpenAPI_point_altitude_parseFromJSON(cJSON *point_alti goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } altitude = cJSON_GetObjectItemCaseSensitive(point_altitudeJSON, "altitude"); if (!altitude) { diff --git a/lib/sbi/openapi/model/point_altitude_all_of.c b/lib/sbi/openapi/model/point_altitude_all_of.c index 5cd1847d7..ae41462b0 100644 --- a/lib/sbi/openapi/model/point_altitude_all_of.c +++ b/lib/sbi/openapi/model/point_altitude_all_of.c @@ -80,6 +80,10 @@ OpenAPI_point_altitude_all_of_t *OpenAPI_point_altitude_all_of_parseFromJSON(cJS goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_all_ofJSON, "altitude"); if (!altitude) { diff --git a/lib/sbi/openapi/model/point_altitude_uncertainty.c b/lib/sbi/openapi/model/point_altitude_uncertainty.c index a33589a08..8557a7576 100644 --- a/lib/sbi/openapi/model/point_altitude_uncertainty.c +++ b/lib/sbi/openapi/model/point_altitude_uncertainty.c @@ -142,6 +142,10 @@ OpenAPI_point_altitude_uncertainty_t *OpenAPI_point_altitude_uncertainty_parseFr goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertaintyJSON, "point"); if (!point) { @@ -149,6 +153,10 @@ OpenAPI_point_altitude_uncertainty_t *OpenAPI_point_altitude_uncertainty_parseFr goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertaintyJSON, "altitude"); if (!altitude) { @@ -166,6 +174,10 @@ OpenAPI_point_altitude_uncertainty_t *OpenAPI_point_altitude_uncertainty_parseFr goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } uncertainty_altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertaintyJSON, "uncertaintyAltitude"); if (!uncertainty_altitude) { diff --git a/lib/sbi/openapi/model/point_altitude_uncertainty_all_of.c b/lib/sbi/openapi/model/point_altitude_uncertainty_all_of.c index e3a3d1568..04ce14359 100644 --- a/lib/sbi/openapi/model/point_altitude_uncertainty_all_of.c +++ b/lib/sbi/openapi/model/point_altitude_uncertainty_all_of.c @@ -119,6 +119,10 @@ OpenAPI_point_altitude_uncertainty_all_of_t *OpenAPI_point_altitude_uncertainty_ goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "altitude"); if (!altitude) { @@ -136,6 +140,10 @@ OpenAPI_point_altitude_uncertainty_all_of_t *OpenAPI_point_altitude_uncertainty_ goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } uncertainty_altitude = cJSON_GetObjectItemCaseSensitive(point_altitude_uncertainty_all_ofJSON, "uncertaintyAltitude"); if (!uncertainty_altitude) { diff --git a/lib/sbi/openapi/model/point_uncertainty_circle.c b/lib/sbi/openapi/model/point_uncertainty_circle.c index 228f5ea0f..4a0466867 100644 --- a/lib/sbi/openapi/model/point_uncertainty_circle.c +++ b/lib/sbi/openapi/model/point_uncertainty_circle.c @@ -103,6 +103,10 @@ OpenAPI_point_uncertainty_circle_t *OpenAPI_point_uncertainty_circle_parseFromJS goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circleJSON, "point"); if (!point) { @@ -110,6 +114,10 @@ OpenAPI_point_uncertainty_circle_t *OpenAPI_point_uncertainty_circle_parseFromJS goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } uncertainty = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circleJSON, "uncertainty"); if (!uncertainty) { diff --git a/lib/sbi/openapi/model/point_uncertainty_circle_all_of.c b/lib/sbi/openapi/model/point_uncertainty_circle_all_of.c index 6b25b9a85..7a56e27ef 100644 --- a/lib/sbi/openapi/model/point_uncertainty_circle_all_of.c +++ b/lib/sbi/openapi/model/point_uncertainty_circle_all_of.c @@ -80,6 +80,10 @@ OpenAPI_point_uncertainty_circle_all_of_t *OpenAPI_point_uncertainty_circle_all_ goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } uncertainty = cJSON_GetObjectItemCaseSensitive(point_uncertainty_circle_all_ofJSON, "uncertainty"); if (!uncertainty) { diff --git a/lib/sbi/openapi/model/point_uncertainty_ellipse.c b/lib/sbi/openapi/model/point_uncertainty_ellipse.c index 477353015..11e9ad95b 100644 --- a/lib/sbi/openapi/model/point_uncertainty_ellipse.c +++ b/lib/sbi/openapi/model/point_uncertainty_ellipse.c @@ -126,6 +126,10 @@ OpenAPI_point_uncertainty_ellipse_t *OpenAPI_point_uncertainty_ellipse_parseFrom goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point = cJSON_GetObjectItemCaseSensitive(point_uncertainty_ellipseJSON, "point"); if (!point) { @@ -133,6 +137,10 @@ OpenAPI_point_uncertainty_ellipse_t *OpenAPI_point_uncertainty_ellipse_parseFrom goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(point_uncertainty_ellipseJSON, "uncertaintyEllipse"); if (!uncertainty_ellipse) { @@ -140,6 +148,10 @@ OpenAPI_point_uncertainty_ellipse_t *OpenAPI_point_uncertainty_ellipse_parseFrom goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(point_uncertainty_ellipseJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/point_uncertainty_ellipse_all_of.c b/lib/sbi/openapi/model/point_uncertainty_ellipse_all_of.c index 40e941447..473f260c9 100644 --- a/lib/sbi/openapi/model/point_uncertainty_ellipse_all_of.c +++ b/lib/sbi/openapi/model/point_uncertainty_ellipse_all_of.c @@ -103,6 +103,10 @@ OpenAPI_point_uncertainty_ellipse_all_of_t *OpenAPI_point_uncertainty_ellipse_al goto end; } point_local_nonprim = OpenAPI_geographical_coordinates_parseFromJSON(point); + if (!point_local_nonprim) { + ogs_error("OpenAPI_geographical_coordinates_parseFromJSON failed [point]"); + goto end; + } uncertainty_ellipse = cJSON_GetObjectItemCaseSensitive(point_uncertainty_ellipse_all_ofJSON, "uncertaintyEllipse"); if (!uncertainty_ellipse) { @@ -110,6 +114,10 @@ OpenAPI_point_uncertainty_ellipse_all_of_t *OpenAPI_point_uncertainty_ellipse_al goto end; } uncertainty_ellipse_local_nonprim = OpenAPI_uncertainty_ellipse_parseFromJSON(uncertainty_ellipse); + if (!uncertainty_ellipse_local_nonprim) { + ogs_error("OpenAPI_uncertainty_ellipse_parseFromJSON failed [uncertainty_ellipse]"); + goto end; + } confidence = cJSON_GetObjectItemCaseSensitive(point_uncertainty_ellipse_all_ofJSON, "confidence"); if (!confidence) { diff --git a/lib/sbi/openapi/model/policy_association.c b/lib/sbi/openapi/model/policy_association.c index e2b7a9c91..50ab5dbe1 100644 --- a/lib/sbi/openapi/model/policy_association.c +++ b/lib/sbi/openapi/model/policy_association.c @@ -345,6 +345,10 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po request = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "request"); if (request) { request_local_nonprim = OpenAPI_policy_association_request_parseFromJSON(request); + if (!request_local_nonprim) { + ogs_error("OpenAPI_policy_association_request_parseFromJSON failed [request]"); + goto end; + } } triggers = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "triggers"); @@ -369,11 +373,19 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "servAreaRes"); if (serv_area_res) { serv_area_res_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(serv_area_res); + if (!serv_area_res_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [serv_area_res]"); + goto end; + } } wl_serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "wlServAreaRes"); if (wl_serv_area_res) { wl_serv_area_res_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wl_serv_area_res); + if (!wl_serv_area_res_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_parseFromJSON failed [wl_serv_area_res]"); + goto end; + } } rfsp = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "rfsp"); @@ -395,11 +407,19 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po smf_sel_info = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "smfSelInfo"); if (smf_sel_info) { smf_sel_info_local_nonprim = OpenAPI_smf_selection_data_parseFromJSON(smf_sel_info); + if (!smf_sel_info_local_nonprim) { + ogs_error("OpenAPI_smf_selection_data_parseFromJSON failed [smf_sel_info]"); + goto end; + } } ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "ueAmbr"); if (ue_ambr) { ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(ue_ambr); + if (!ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [ue_ambr]"); + goto end; + } } ue_slice_mbrs = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "ueSliceMbrs"); @@ -420,7 +440,6 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po OpenAPI_ue_slice_mbr_t *ue_slice_mbrsItem = OpenAPI_ue_slice_mbr_parseFromJSON(ue_slice_mbrs_local); if (!ue_slice_mbrsItem) { ogs_error("No ue_slice_mbrsItem"); - OpenAPI_list_free(ue_slice_mbrsList); goto end; } OpenAPI_list_add(ue_slice_mbrsList, ue_slice_mbrsItem); @@ -466,6 +485,10 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po pcf_ue_info = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "pcfUeInfo"); if (pcf_ue_info) { pcf_ue_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_info); + if (!pcf_ue_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_info]"); + goto end; + } } match_pdus = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "matchPdus"); @@ -486,7 +509,6 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po OpenAPI_pdu_session_info_t *match_pdusItem = OpenAPI_pdu_session_info_parseFromJSON(match_pdus_local); if (!match_pdusItem) { ogs_error("No match_pdusItem"); - OpenAPI_list_free(match_pdusList); goto end; } OpenAPI_list_add(match_pdusList, match_pdusItem); @@ -496,6 +518,10 @@ OpenAPI_policy_association_t *OpenAPI_policy_association_parseFromJSON(cJSON *po as_time_dis_param = cJSON_GetObjectItemCaseSensitive(policy_associationJSON, "asTimeDisParam"); if (as_time_dis_param) { as_time_dis_param_local_nonprim = OpenAPI_as_time_distribution_param_parseFromJSON(as_time_dis_param); + if (!as_time_dis_param_local_nonprim) { + ogs_error("OpenAPI_as_time_distribution_param_parseFromJSON failed [as_time_dis_param]"); + goto end; + } } policy_association_local_var = OpenAPI_policy_association_create ( diff --git a/lib/sbi/openapi/model/policy_association_request.c b/lib/sbi/openapi/model/policy_association_request.c index 588408d81..024c4c8dd 100644 --- a/lib/sbi/openapi/model/policy_association_request.c +++ b/lib/sbi/openapi/model/policy_association_request.c @@ -764,6 +764,10 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr user_loc = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "userLoc"); if (user_loc) { user_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(user_loc); + if (!user_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_loc]"); + goto end; + } } time_zone = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "timeZone"); @@ -777,6 +781,10 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr serving_plmn = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "servingPlmn"); if (serving_plmn) { serving_plmn_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_plmn); + if (!serving_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_plmn]"); + goto end; + } } rat_type = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "ratType"); @@ -831,11 +839,19 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "servAreaRes"); if (serv_area_res) { serv_area_res_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(serv_area_res); + if (!serv_area_res_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [serv_area_res]"); + goto end; + } } wl_serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "wlServAreaRes"); if (wl_serv_area_res) { wl_serv_area_res_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wl_serv_area_res); + if (!wl_serv_area_res_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_parseFromJSON failed [wl_serv_area_res]"); + goto end; + } } rfsp = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "rfsp"); @@ -849,6 +865,10 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "ueAmbr"); if (ue_ambr) { ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(ue_ambr); + if (!ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [ue_ambr]"); + goto end; + } } ue_slice_mbrs = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "ueSliceMbrs"); @@ -869,7 +889,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr OpenAPI_ue_slice_mbr_t *ue_slice_mbrsItem = OpenAPI_ue_slice_mbr_parseFromJSON(ue_slice_mbrs_local); if (!ue_slice_mbrsItem) { ogs_error("No ue_slice_mbrsItem"); - OpenAPI_list_free(ue_slice_mbrsList); goto end; } OpenAPI_list_add(ue_slice_mbrsList, ue_slice_mbrsItem); @@ -894,7 +913,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr 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); @@ -919,7 +937,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr OpenAPI_snssai_t *target_snssaisItem = OpenAPI_snssai_parseFromJSON(target_snssais_local); if (!target_snssaisItem) { ogs_error("No target_snssaisItem"); - OpenAPI_list_free(target_snssaisList); goto end; } OpenAPI_list_add(target_snssaisList, target_snssaisItem); @@ -944,7 +961,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr 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); @@ -969,7 +985,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr 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); @@ -979,6 +994,10 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr guami = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } service_name = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "serviceName"); @@ -992,6 +1011,10 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr trace_req = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "traceReq"); if (trace_req) { trace_req_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_req); + if (!trace_req_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_req]"); + goto end; + } } nwdaf_datas = cJSON_GetObjectItemCaseSensitive(policy_association_requestJSON, "nwdafDatas"); @@ -1012,7 +1035,6 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr OpenAPI_nwdaf_data_t *nwdaf_datasItem = OpenAPI_nwdaf_data_parseFromJSON(nwdaf_datas_local); if (!nwdaf_datasItem) { ogs_error("No nwdaf_datasItem"); - OpenAPI_list_free(nwdaf_datasList); goto end; } OpenAPI_list_add(nwdaf_datasList, nwdaf_datasItem); diff --git a/lib/sbi/openapi/model/policy_association_update_request.c b/lib/sbi/openapi/model/policy_association_update_request.c index 19ae9cde0..a92f6ab9f 100644 --- a/lib/sbi/openapi/model/policy_association_update_request.c +++ b/lib/sbi/openapi/model/policy_association_update_request.c @@ -648,11 +648,19 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r 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); + if (!serv_area_res_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [serv_area_res]"); + goto end; + } } 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); + if (!wl_serv_area_res_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_parseFromJSON failed [wl_serv_area_res]"); + goto end; + } } rfsp = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "rfsp"); @@ -666,11 +674,19 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r 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); + if (!smf_sel_info_local_nonprim) { + ogs_error("OpenAPI_smf_selection_data_parseFromJSON failed [smf_sel_info]"); + goto end; + } } ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ueAmbr"); if (ue_ambr) { ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(ue_ambr); + if (!ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [ue_ambr]"); + goto end; + } } ue_slice_mbrs = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "ueSliceMbrs"); @@ -691,7 +707,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r OpenAPI_ue_slice_mbr_t *ue_slice_mbrsItem = OpenAPI_ue_slice_mbr_parseFromJSON(ue_slice_mbrs_local); if (!ue_slice_mbrsItem) { ogs_error("No ue_slice_mbrsItem"); - OpenAPI_list_free(ue_slice_mbrsList); goto end; } OpenAPI_list_add(ue_slice_mbrsList, ue_slice_mbrsItem); @@ -727,6 +742,10 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r user_loc = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "userLoc"); if (user_loc) { user_loc_local_nonprim = OpenAPI_user_location_parseFromJSON(user_loc); + if (!user_loc_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_loc]"); + goto end; + } } allowed_snssais = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "allowedSnssais"); @@ -747,7 +766,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r 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); @@ -772,7 +790,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r OpenAPI_snssai_t *target_snssaisItem = OpenAPI_snssai_parseFromJSON(target_snssais_local); if (!target_snssaisItem) { ogs_error("No target_snssaisItem"); - OpenAPI_list_free(target_snssaisList); goto end; } OpenAPI_list_add(target_snssaisList, target_snssaisItem); @@ -797,7 +814,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r 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); @@ -860,7 +876,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r 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); @@ -870,11 +885,19 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r trace_req = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "traceReq"); if (trace_req) { trace_req_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_req); + if (!trace_req_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_req]"); + goto end; + } } guami = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } nwdaf_datas = cJSON_GetObjectItemCaseSensitive(policy_association_update_requestJSON, "nwdafDatas"); @@ -895,7 +918,6 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r OpenAPI_nwdaf_data_t *nwdaf_datasItem = OpenAPI_nwdaf_data_parseFromJSON(nwdaf_datas_local); if (!nwdaf_datasItem) { ogs_error("No nwdaf_datasItem"); - OpenAPI_list_free(nwdaf_datasList); goto end; } OpenAPI_list_add(nwdaf_datasList, nwdaf_datasItem); diff --git a/lib/sbi/openapi/model/policy_data_change_notification.c b/lib/sbi/openapi/model/policy_data_change_notification.c index d60ecdc8a..3bfff1229 100644 --- a/lib/sbi/openapi/model/policy_data_change_notification.c +++ b/lib/sbi/openapi/model/policy_data_change_notification.c @@ -435,41 +435,73 @@ OpenAPI_policy_data_change_notification_t *OpenAPI_policy_data_change_notificati am_policy_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "amPolicyData"); if (am_policy_data) { am_policy_data_local_nonprim = OpenAPI_am_policy_data_parseFromJSON(am_policy_data); + if (!am_policy_data_local_nonprim) { + ogs_error("OpenAPI_am_policy_data_parseFromJSON failed [am_policy_data]"); + goto end; + } } ue_policy_set = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "uePolicySet"); if (ue_policy_set) { ue_policy_set_local_nonprim = OpenAPI_ue_policy_set_parseFromJSON(ue_policy_set); + if (!ue_policy_set_local_nonprim) { + ogs_error("OpenAPI_ue_policy_set_parseFromJSON failed [ue_policy_set]"); + goto end; + } } plmn_ue_policy_set = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "plmnUePolicySet"); if (plmn_ue_policy_set) { plmn_ue_policy_set_local_nonprim = OpenAPI_ue_policy_set_parseFromJSON(plmn_ue_policy_set); + if (!plmn_ue_policy_set_local_nonprim) { + ogs_error("OpenAPI_ue_policy_set_parseFromJSON failed [plmn_ue_policy_set]"); + goto end; + } } sm_policy_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "smPolicyData"); if (sm_policy_data) { sm_policy_data_local_nonprim = OpenAPI_sm_policy_data_parseFromJSON(sm_policy_data); + if (!sm_policy_data_local_nonprim) { + ogs_error("OpenAPI_sm_policy_data_parseFromJSON failed [sm_policy_data]"); + goto end; + } } usage_mon_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "usageMonData"); if (usage_mon_data) { usage_mon_data_local_nonprim = OpenAPI_usage_mon_data_parseFromJSON(usage_mon_data); + if (!usage_mon_data_local_nonprim) { + ogs_error("OpenAPI_usage_mon_data_parseFromJSON failed [usage_mon_data]"); + goto end; + } } sponsor_connectivity_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "SponsorConnectivityData"); if (sponsor_connectivity_data) { sponsor_connectivity_data_local_nonprim = OpenAPI_sponsor_connectivity_data_parseFromJSON(sponsor_connectivity_data); + if (!sponsor_connectivity_data_local_nonprim) { + ogs_error("OpenAPI_sponsor_connectivity_data_parseFromJSON failed [sponsor_connectivity_data]"); + goto end; + } } bdt_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "bdtData"); if (bdt_data) { bdt_data_local_nonprim = OpenAPI_bdt_data_parseFromJSON(bdt_data); + if (!bdt_data_local_nonprim) { + ogs_error("OpenAPI_bdt_data_parseFromJSON failed [bdt_data]"); + goto end; + } } op_spec_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "opSpecData"); if (op_spec_data) { op_spec_data_local_nonprim = OpenAPI_operator_specific_data_container_parseFromJSON(op_spec_data); + if (!op_spec_data_local_nonprim) { + ogs_error("OpenAPI_operator_specific_data_container_parseFromJSON failed [op_spec_data]"); + goto end; + } } op_spec_data_map = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "opSpecDataMap"); @@ -533,6 +565,10 @@ OpenAPI_policy_data_change_notification_t *OpenAPI_policy_data_change_notificati plmn_id = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } } del_resources = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "delResources"); @@ -582,7 +618,6 @@ OpenAPI_policy_data_change_notification_t *OpenAPI_policy_data_change_notificati OpenAPI_notification_item_t *reported_fragmentsItem = OpenAPI_notification_item_parseFromJSON(reported_fragments_local); if (!reported_fragmentsItem) { ogs_error("No reported_fragmentsItem"); - OpenAPI_list_free(reported_fragmentsList); goto end; } OpenAPI_list_add(reported_fragmentsList, reported_fragmentsItem); @@ -592,11 +627,19 @@ OpenAPI_policy_data_change_notification_t *OpenAPI_policy_data_change_notificati slice_policy_data = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "slicePolicyData"); if (slice_policy_data) { slice_policy_data_local_nonprim = OpenAPI_slice_policy_data_parseFromJSON(slice_policy_data); + if (!slice_policy_data_local_nonprim) { + ogs_error("OpenAPI_slice_policy_data_parseFromJSON failed [slice_policy_data]"); + goto end; + } } snssai = cJSON_GetObjectItemCaseSensitive(policy_data_change_notificationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } policy_data_change_notification_local_var = OpenAPI_policy_data_change_notification_create ( diff --git a/lib/sbi/openapi/model/policy_data_for_individual_ue.c b/lib/sbi/openapi/model/policy_data_for_individual_ue.c index 30b977bde..9d6543efd 100644 --- a/lib/sbi/openapi/model/policy_data_for_individual_ue.c +++ b/lib/sbi/openapi/model/policy_data_for_individual_ue.c @@ -181,16 +181,28 @@ OpenAPI_policy_data_for_individual_ue_t *OpenAPI_policy_data_for_individual_ue_p ue_policy_data_set = cJSON_GetObjectItemCaseSensitive(policy_data_for_individual_ueJSON, "uePolicyDataSet"); if (ue_policy_data_set) { ue_policy_data_set_local_nonprim = OpenAPI_ue_policy_set_parseFromJSON(ue_policy_data_set); + if (!ue_policy_data_set_local_nonprim) { + ogs_error("OpenAPI_ue_policy_set_parseFromJSON failed [ue_policy_data_set]"); + goto end; + } } sm_policy_data_set = cJSON_GetObjectItemCaseSensitive(policy_data_for_individual_ueJSON, "smPolicyDataSet"); if (sm_policy_data_set) { sm_policy_data_set_local_nonprim = OpenAPI_sm_policy_data_parseFromJSON(sm_policy_data_set); + if (!sm_policy_data_set_local_nonprim) { + ogs_error("OpenAPI_sm_policy_data_parseFromJSON failed [sm_policy_data_set]"); + goto end; + } } am_policy_data_set = cJSON_GetObjectItemCaseSensitive(policy_data_for_individual_ueJSON, "amPolicyDataSet"); if (am_policy_data_set) { am_policy_data_set_local_nonprim = OpenAPI_am_policy_data_parseFromJSON(am_policy_data_set); + if (!am_policy_data_set_local_nonprim) { + ogs_error("OpenAPI_am_policy_data_parseFromJSON failed [am_policy_data_set]"); + goto end; + } } um_data = cJSON_GetObjectItemCaseSensitive(policy_data_for_individual_ueJSON, "umData"); diff --git a/lib/sbi/openapi/model/policy_data_subscription.c b/lib/sbi/openapi/model/policy_data_subscription.c index c7812baab..b0f356369 100644 --- a/lib/sbi/openapi/model/policy_data_subscription.c +++ b/lib/sbi/openapi/model/policy_data_subscription.c @@ -266,7 +266,6 @@ OpenAPI_policy_data_subscription_t *OpenAPI_policy_data_subscription_parseFromJS OpenAPI_resource_item_t *mon_res_itemsItem = OpenAPI_resource_item_parseFromJSON(mon_res_items_local); if (!mon_res_itemsItem) { ogs_error("No mon_res_itemsItem"); - OpenAPI_list_free(mon_res_itemsList); goto end; } OpenAPI_list_add(mon_res_itemsList, mon_res_itemsItem); @@ -291,7 +290,6 @@ OpenAPI_policy_data_subscription_t *OpenAPI_policy_data_subscription_parseFromJS OpenAPI_resource_item_t *excluded_res_itemsItem = OpenAPI_resource_item_parseFromJSON(excluded_res_items_local); if (!excluded_res_itemsItem) { ogs_error("No excluded_res_itemsItem"); - OpenAPI_list_free(excluded_res_itemsList); goto end; } OpenAPI_list_add(excluded_res_itemsList, excluded_res_itemsItem); diff --git a/lib/sbi/openapi/model/policy_update.c b/lib/sbi/openapi/model/policy_update.c index 778828543..cb7c29900 100644 --- a/lib/sbi/openapi/model/policy_update.c +++ b/lib/sbi/openapi/model/policy_update.c @@ -353,11 +353,19 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "servAreaRes"); if (serv_area_res) { serv_area_res_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(serv_area_res); + if (!serv_area_res_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [serv_area_res]"); + goto end; + } } wl_serv_area_res = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "wlServAreaRes"); if (wl_serv_area_res) { wl_serv_area_res_local_nonprim = OpenAPI_wireline_service_area_restriction_parseFromJSON(wl_serv_area_res); + if (!wl_serv_area_res_local_nonprim) { + ogs_error("OpenAPI_wireline_service_area_restriction_parseFromJSON failed [wl_serv_area_res]"); + goto end; + } } rfsp = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "rfsp"); @@ -379,11 +387,19 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat smf_sel_info = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "smfSelInfo"); if (smf_sel_info) { smf_sel_info_local_nonprim = OpenAPI_smf_selection_data_parseFromJSON(smf_sel_info); + if (!smf_sel_info_local_nonprim) { + ogs_error("OpenAPI_smf_selection_data_parseFromJSON failed [smf_sel_info]"); + goto end; + } } ue_ambr = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "ueAmbr"); if (ue_ambr) { ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(ue_ambr); + if (!ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [ue_ambr]"); + goto end; + } } ue_slice_mbrs = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "ueSliceMbrs"); @@ -404,7 +420,6 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat OpenAPI_ue_slice_mbr_t *ue_slice_mbrsItem = OpenAPI_ue_slice_mbr_parseFromJSON(ue_slice_mbrs_local); if (!ue_slice_mbrsItem) { ogs_error("No ue_slice_mbrsItem"); - OpenAPI_list_free(ue_slice_mbrsList); goto end; } OpenAPI_list_add(ue_slice_mbrsList, ue_slice_mbrsItem); @@ -440,6 +455,10 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat pcf_ue_info = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "pcfUeInfo"); if (pcf_ue_info) { pcf_ue_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_info); + if (!pcf_ue_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_info]"); + goto end; + } } match_pdus = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "matchPdus"); @@ -460,7 +479,6 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat OpenAPI_pdu_session_info_t *match_pdusItem = OpenAPI_pdu_session_info_parseFromJSON(match_pdus_local); if (!match_pdusItem) { ogs_error("No match_pdusItem"); - OpenAPI_list_free(match_pdusList); goto end; } OpenAPI_list_add(match_pdusList, match_pdusItem); @@ -470,6 +488,10 @@ OpenAPI_policy_update_t *OpenAPI_policy_update_parseFromJSON(cJSON *policy_updat as_time_dis_param = cJSON_GetObjectItemCaseSensitive(policy_updateJSON, "asTimeDisParam"); if (as_time_dis_param) { as_time_dis_param_local_nonprim = OpenAPI_as_time_distribution_param_parseFromJSON(as_time_dis_param); + if (!as_time_dis_param_local_nonprim) { + ogs_error("OpenAPI_as_time_distribution_param_parseFromJSON failed [as_time_dis_param]"); + goto end; + } } policy_update_local_var = OpenAPI_policy_update_create ( diff --git a/lib/sbi/openapi/model/polygon.c b/lib/sbi/openapi/model/polygon.c index 42001032f..acb616614 100644 --- a/lib/sbi/openapi/model/polygon.c +++ b/lib/sbi/openapi/model/polygon.c @@ -101,6 +101,10 @@ OpenAPI_polygon_t *OpenAPI_polygon_parseFromJSON(cJSON *polygonJSON) goto end; } shape_local_nonprim = OpenAPI_supported_gad_shapes_parseFromJSON(shape); + if (!shape_local_nonprim) { + ogs_error("OpenAPI_supported_gad_shapes_parseFromJSON failed [shape]"); + goto end; + } point_list = cJSON_GetObjectItemCaseSensitive(polygonJSON, "pointList"); if (!point_list) { @@ -123,7 +127,6 @@ OpenAPI_polygon_t *OpenAPI_polygon_parseFromJSON(cJSON *polygonJSON) OpenAPI_geographical_coordinates_t *point_listItem = OpenAPI_geographical_coordinates_parseFromJSON(point_list_local); if (!point_listItem) { ogs_error("No point_listItem"); - OpenAPI_list_free(point_listList); goto end; } OpenAPI_list_add(point_listList, point_listItem); diff --git a/lib/sbi/openapi/model/polygon_all_of.c b/lib/sbi/openapi/model/polygon_all_of.c index 44994b481..a3b30f089 100644 --- a/lib/sbi/openapi/model/polygon_all_of.c +++ b/lib/sbi/openapi/model/polygon_all_of.c @@ -93,7 +93,6 @@ OpenAPI_polygon_all_of_t *OpenAPI_polygon_all_of_parseFromJSON(cJSON *polygon_al OpenAPI_geographical_coordinates_t *point_listItem = OpenAPI_geographical_coordinates_parseFromJSON(point_list_local); if (!point_listItem) { ogs_error("No point_listItem"); - OpenAPI_list_free(point_listList); goto end; } OpenAPI_list_add(point_listList, point_listItem); diff --git a/lib/sbi/openapi/model/pp_data.c b/lib/sbi/openapi/model/pp_data.c index 9a7348065..b8e6ac326 100644 --- a/lib/sbi/openapi/model/pp_data.c +++ b/lib/sbi/openapi/model/pp_data.c @@ -221,6 +221,10 @@ OpenAPI_pp_data_t *OpenAPI_pp_data_parseFromJSON(cJSON *pp_dataJSON) communication_characteristics = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "communicationCharacteristics"); if (communication_characteristics) { communication_characteristics_local_nonprim = OpenAPI_communication_characteristics_parseFromJSON(communication_characteristics); + if (!communication_characteristics_local_nonprim) { + ogs_error("OpenAPI_communication_characteristics_parseFromJSON failed [communication_characteristics]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "supportedFeatures"); @@ -234,16 +238,28 @@ OpenAPI_pp_data_t *OpenAPI_pp_data_parseFromJSON(cJSON *pp_dataJSON) expected_ue_behaviour_parameters = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "expectedUeBehaviourParameters"); if (expected_ue_behaviour_parameters) { expected_ue_behaviour_parameters_local_nonprim = OpenAPI_expected_ue_behaviour_parseFromJSON(expected_ue_behaviour_parameters); + if (!expected_ue_behaviour_parameters_local_nonprim) { + ogs_error("OpenAPI_expected_ue_behaviour_parseFromJSON failed [expected_ue_behaviour_parameters]"); + goto end; + } } ec_restriction = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "ecRestriction"); if (ec_restriction) { ec_restriction_local_nonprim = OpenAPI_ec_restriction_parseFromJSON(ec_restriction); + if (!ec_restriction_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_parseFromJSON failed [ec_restriction]"); + goto end; + } } acs_info = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "acsInfo"); if (acs_info) { acs_info_local_nonprim = OpenAPI_acs_info_rm_parseFromJSON(acs_info); + if (!acs_info_local_nonprim) { + ogs_error("OpenAPI_acs_info_rm_parseFromJSON failed [acs_info]"); + goto end; + } } stn_sr = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "stnSr"); @@ -257,16 +273,28 @@ OpenAPI_pp_data_t *OpenAPI_pp_data_parseFromJSON(cJSON *pp_dataJSON) lcs_privacy = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "lcsPrivacy"); if (lcs_privacy) { lcs_privacy_local_nonprim = OpenAPI_lcs_privacy_parseFromJSON(lcs_privacy); + if (!lcs_privacy_local_nonprim) { + ogs_error("OpenAPI_lcs_privacy_parseFromJSON failed [lcs_privacy]"); + goto end; + } } sor_info = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "sorInfo"); if (sor_info) { sor_info_local_nonprim = OpenAPI_sor_info_parseFromJSON(sor_info); + if (!sor_info_local_nonprim) { + ogs_error("OpenAPI_sor_info_parseFromJSON failed [sor_info]"); + goto end; + } } _5mbs_authorization_info = cJSON_GetObjectItemCaseSensitive(pp_dataJSON, "5mbsAuthorizationInfo"); if (_5mbs_authorization_info) { _5mbs_authorization_info_local_nonprim = OpenAPI_model_5_mbs_authorization_info_parseFromJSON(_5mbs_authorization_info); + if (!_5mbs_authorization_info_local_nonprim) { + ogs_error("OpenAPI_model_5_mbs_authorization_info_parseFromJSON failed [_5mbs_authorization_info]"); + goto end; + } } pp_data_local_var = OpenAPI_pp_data_create ( diff --git a/lib/sbi/openapi/model/pp_data_entry.c b/lib/sbi/openapi/model/pp_data_entry.c index baab53966..89734dbbf 100644 --- a/lib/sbi/openapi/model/pp_data_entry.c +++ b/lib/sbi/openapi/model/pp_data_entry.c @@ -190,6 +190,10 @@ OpenAPI_pp_data_entry_t *OpenAPI_pp_data_entry_parseFromJSON(cJSON *pp_data_entr communication_characteristics = cJSON_GetObjectItemCaseSensitive(pp_data_entryJSON, "communicationCharacteristics"); if (communication_characteristics) { communication_characteristics_local_nonprim = OpenAPI_communication_characteristics_af_parseFromJSON(communication_characteristics); + if (!communication_characteristics_local_nonprim) { + ogs_error("OpenAPI_communication_characteristics_af_parseFromJSON failed [communication_characteristics]"); + goto end; + } } reference_id = cJSON_GetObjectItemCaseSensitive(pp_data_entryJSON, "referenceId"); @@ -227,6 +231,10 @@ OpenAPI_pp_data_entry_t *OpenAPI_pp_data_entry_parseFromJSON(cJSON *pp_data_entr ecs_addr_config_info = cJSON_GetObjectItemCaseSensitive(pp_data_entryJSON, "ecsAddrConfigInfo"); if (ecs_addr_config_info) { ecs_addr_config_info_local_nonprim = OpenAPI_ecs_addr_config_info_1_parseFromJSON(ecs_addr_config_info); + if (!ecs_addr_config_info_local_nonprim) { + ogs_error("OpenAPI_ecs_addr_config_info_1_parseFromJSON failed [ecs_addr_config_info]"); + goto end; + } } additional_ecs_addr_config_infos = cJSON_GetObjectItemCaseSensitive(pp_data_entryJSON, "additionalEcsAddrConfigInfos"); @@ -247,7 +255,6 @@ OpenAPI_pp_data_entry_t *OpenAPI_pp_data_entry_parseFromJSON(cJSON *pp_data_entr OpenAPI_ecs_addr_config_info_1_t *additional_ecs_addr_config_infosItem = OpenAPI_ecs_addr_config_info_1_parseFromJSON(additional_ecs_addr_config_infos_local); if (!additional_ecs_addr_config_infosItem) { ogs_error("No additional_ecs_addr_config_infosItem"); - OpenAPI_list_free(additional_ecs_addr_config_infosList); goto end; } OpenAPI_list_add(additional_ecs_addr_config_infosList, additional_ecs_addr_config_infosItem); @@ -257,6 +264,10 @@ OpenAPI_pp_data_entry_t *OpenAPI_pp_data_entry_parseFromJSON(cJSON *pp_data_entr ec_restriction = cJSON_GetObjectItemCaseSensitive(pp_data_entryJSON, "ecRestriction"); if (ec_restriction) { ec_restriction_local_nonprim = OpenAPI_ec_restriction_1_parseFromJSON(ec_restriction); + if (!ec_restriction_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_1_parseFromJSON failed [ec_restriction]"); + goto end; + } } pp_data_entry_local_var = OpenAPI_pp_data_entry_create ( diff --git a/lib/sbi/openapi/model/pp_data_entry_list.c b/lib/sbi/openapi/model/pp_data_entry_list.c index a1f567a29..04cf10e98 100644 --- a/lib/sbi/openapi/model/pp_data_entry_list.c +++ b/lib/sbi/openapi/model/pp_data_entry_list.c @@ -102,7 +102,6 @@ OpenAPI_pp_data_entry_list_t *OpenAPI_pp_data_entry_list_parseFromJSON(cJSON *pp OpenAPI_pp_data_entry_t *pp_data_entry_listItem = OpenAPI_pp_data_entry_parseFromJSON(pp_data_entry_list_local); if (!pp_data_entry_listItem) { ogs_error("No pp_data_entry_listItem"); - OpenAPI_list_free(pp_data_entry_listList); goto end; } OpenAPI_list_add(pp_data_entry_listList, pp_data_entry_listItem); diff --git a/lib/sbi/openapi/model/pp_dl_packet_count_ext.c b/lib/sbi/openapi/model/pp_dl_packet_count_ext.c index 37964625d..caa8f3eb3 100644 --- a/lib/sbi/openapi/model/pp_dl_packet_count_ext.c +++ b/lib/sbi/openapi/model/pp_dl_packet_count_ext.c @@ -161,6 +161,10 @@ OpenAPI_pp_dl_packet_count_ext_t *OpenAPI_pp_dl_packet_count_ext_parseFromJSON(c single_nssai = cJSON_GetObjectItemCaseSensitive(pp_dl_packet_count_extJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } validity_time = cJSON_GetObjectItemCaseSensitive(pp_dl_packet_count_extJSON, "validityTime"); diff --git a/lib/sbi/openapi/model/presence_info.c b/lib/sbi/openapi/model/presence_info.c index e018d210a..cd27eecd2 100644 --- a/lib/sbi/openapi/model/presence_info.c +++ b/lib/sbi/openapi/model/presence_info.c @@ -260,7 +260,6 @@ OpenAPI_presence_info_t *OpenAPI_presence_info_parseFromJSON(cJSON *presence_inf OpenAPI_tai_t *tracking_area_listItem = OpenAPI_tai_parseFromJSON(tracking_area_list_local); if (!tracking_area_listItem) { ogs_error("No tracking_area_listItem"); - OpenAPI_list_free(tracking_area_listList); goto end; } OpenAPI_list_add(tracking_area_listList, tracking_area_listItem); @@ -285,7 +284,6 @@ OpenAPI_presence_info_t *OpenAPI_presence_info_parseFromJSON(cJSON *presence_inf OpenAPI_ecgi_t *ecgi_listItem = OpenAPI_ecgi_parseFromJSON(ecgi_list_local); if (!ecgi_listItem) { ogs_error("No ecgi_listItem"); - OpenAPI_list_free(ecgi_listList); goto end; } OpenAPI_list_add(ecgi_listList, ecgi_listItem); @@ -310,7 +308,6 @@ OpenAPI_presence_info_t *OpenAPI_presence_info_parseFromJSON(cJSON *presence_inf OpenAPI_ncgi_t *ncgi_listItem = OpenAPI_ncgi_parseFromJSON(ncgi_list_local); if (!ncgi_listItem) { ogs_error("No ncgi_listItem"); - OpenAPI_list_free(ncgi_listList); goto end; } OpenAPI_list_add(ncgi_listList, ncgi_listItem); @@ -335,7 +332,6 @@ OpenAPI_presence_info_t *OpenAPI_presence_info_parseFromJSON(cJSON *presence_inf OpenAPI_global_ran_node_id_t *global_ran_node_id_listItem = OpenAPI_global_ran_node_id_parseFromJSON(global_ran_node_id_list_local); if (!global_ran_node_id_listItem) { ogs_error("No global_ran_node_id_listItem"); - OpenAPI_list_free(global_ran_node_id_listList); goto end; } OpenAPI_list_add(global_ran_node_id_listList, global_ran_node_id_listItem); @@ -360,7 +356,6 @@ OpenAPI_presence_info_t *OpenAPI_presence_info_parseFromJSON(cJSON *presence_inf OpenAPI_global_ran_node_id_t *globale_nb_id_listItem = OpenAPI_global_ran_node_id_parseFromJSON(globale_nb_id_list_local); if (!globale_nb_id_listItem) { ogs_error("No globale_nb_id_listItem"); - OpenAPI_list_free(globale_nb_id_listList); goto end; } OpenAPI_list_add(globale_nb_id_listList, globale_nb_id_listItem); diff --git a/lib/sbi/openapi/model/presence_info_rm.c b/lib/sbi/openapi/model/presence_info_rm.c index 5889cc65c..2eccf833f 100644 --- a/lib/sbi/openapi/model/presence_info_rm.c +++ b/lib/sbi/openapi/model/presence_info_rm.c @@ -260,7 +260,6 @@ OpenAPI_presence_info_rm_t *OpenAPI_presence_info_rm_parseFromJSON(cJSON *presen OpenAPI_tai_t *tracking_area_listItem = OpenAPI_tai_parseFromJSON(tracking_area_list_local); if (!tracking_area_listItem) { ogs_error("No tracking_area_listItem"); - OpenAPI_list_free(tracking_area_listList); goto end; } OpenAPI_list_add(tracking_area_listList, tracking_area_listItem); @@ -285,7 +284,6 @@ OpenAPI_presence_info_rm_t *OpenAPI_presence_info_rm_parseFromJSON(cJSON *presen OpenAPI_ecgi_t *ecgi_listItem = OpenAPI_ecgi_parseFromJSON(ecgi_list_local); if (!ecgi_listItem) { ogs_error("No ecgi_listItem"); - OpenAPI_list_free(ecgi_listList); goto end; } OpenAPI_list_add(ecgi_listList, ecgi_listItem); @@ -310,7 +308,6 @@ OpenAPI_presence_info_rm_t *OpenAPI_presence_info_rm_parseFromJSON(cJSON *presen OpenAPI_ncgi_t *ncgi_listItem = OpenAPI_ncgi_parseFromJSON(ncgi_list_local); if (!ncgi_listItem) { ogs_error("No ncgi_listItem"); - OpenAPI_list_free(ncgi_listList); goto end; } OpenAPI_list_add(ncgi_listList, ncgi_listItem); @@ -335,7 +332,6 @@ OpenAPI_presence_info_rm_t *OpenAPI_presence_info_rm_parseFromJSON(cJSON *presen OpenAPI_global_ran_node_id_t *global_ran_node_id_listItem = OpenAPI_global_ran_node_id_parseFromJSON(global_ran_node_id_list_local); if (!global_ran_node_id_listItem) { ogs_error("No global_ran_node_id_listItem"); - OpenAPI_list_free(global_ran_node_id_listList); goto end; } OpenAPI_list_add(global_ran_node_id_listList, global_ran_node_id_listItem); @@ -360,7 +356,6 @@ OpenAPI_presence_info_rm_t *OpenAPI_presence_info_rm_parseFromJSON(cJSON *presen OpenAPI_global_ran_node_id_t *globale_nb_id_listItem = OpenAPI_global_ran_node_id_parseFromJSON(globale_nb_id_list_local); if (!globale_nb_id_listItem) { ogs_error("No globale_nb_id_listItem"); - OpenAPI_list_free(globale_nb_id_listList); goto end; } OpenAPI_list_add(globale_nb_id_listList, globale_nb_id_listItem); diff --git a/lib/sbi/openapi/model/prev_sub_info.c b/lib/sbi/openapi/model/prev_sub_info.c index c132d96e7..41a8e5618 100644 --- a/lib/sbi/openapi/model/prev_sub_info.c +++ b/lib/sbi/openapi/model/prev_sub_info.c @@ -185,7 +185,6 @@ OpenAPI_prev_sub_info_t *OpenAPI_prev_sub_info_parseFromJSON(cJSON *prev_sub_inf OpenAPI_nwdaf_event_t *nf_ana_eventsItem = OpenAPI_nwdaf_event_parseFromJSON(nf_ana_events_local); if (!nf_ana_eventsItem) { ogs_error("No nf_ana_eventsItem"); - OpenAPI_list_free(nf_ana_eventsList); goto end; } OpenAPI_list_add(nf_ana_eventsList, nf_ana_eventsItem); @@ -210,7 +209,6 @@ OpenAPI_prev_sub_info_t *OpenAPI_prev_sub_info_parseFromJSON(cJSON *prev_sub_inf OpenAPI_ue_analytics_context_descriptor_t *ue_ana_eventsItem = OpenAPI_ue_analytics_context_descriptor_parseFromJSON(ue_ana_events_local); if (!ue_ana_eventsItem) { ogs_error("No ue_ana_eventsItem"); - OpenAPI_list_free(ue_ana_eventsList); goto end; } OpenAPI_list_add(ue_ana_eventsList, ue_ana_eventsItem); diff --git a/lib/sbi/openapi/model/pro_se_allowed_plmn.c b/lib/sbi/openapi/model/pro_se_allowed_plmn.c index ed87ed345..503ccd403 100644 --- a/lib/sbi/openapi/model/pro_se_allowed_plmn.c +++ b/lib/sbi/openapi/model/pro_se_allowed_plmn.c @@ -94,6 +94,10 @@ OpenAPI_pro_se_allowed_plmn_t *OpenAPI_pro_se_allowed_plmn_parseFromJSON(cJSON * goto end; } visited_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(visited_plmn); + if (!visited_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [visited_plmn]"); + goto end; + } prose_direct_allowed = cJSON_GetObjectItemCaseSensitive(pro_se_allowed_plmnJSON, "proseDirectAllowed"); if (prose_direct_allowed) { diff --git a/lib/sbi/openapi/model/pro_se_authentication_ctx.c b/lib/sbi/openapi/model/pro_se_authentication_ctx.c index 21e635146..40346af9c 100644 --- a/lib/sbi/openapi/model/pro_se_authentication_ctx.c +++ b/lib/sbi/openapi/model/pro_se_authentication_ctx.c @@ -176,6 +176,10 @@ OpenAPI_pro_se_authentication_ctx_t *OpenAPI_pro_se_authentication_ctx_parseFrom goto end; } pro_se_auth_data_local_nonprim = OpenAPI_pro_se_auth_data_parseFromJSON(pro_se_auth_data); + if (!pro_se_auth_data_local_nonprim) { + ogs_error("OpenAPI_pro_se_auth_data_parseFromJSON failed [pro_se_auth_data]"); + goto end; + } supported_features = cJSON_GetObjectItemCaseSensitive(pro_se_authentication_ctxJSON, "supportedFeatures"); if (supported_features) { diff --git a/lib/sbi/openapi/model/pro_se_authentication_info_request.c b/lib/sbi/openapi/model/pro_se_authentication_info_request.c index 5a4d95a01..5243419cf 100644 --- a/lib/sbi/openapi/model/pro_se_authentication_info_request.c +++ b/lib/sbi/openapi/model/pro_se_authentication_info_request.c @@ -125,6 +125,10 @@ OpenAPI_pro_se_authentication_info_request_t *OpenAPI_pro_se_authentication_info resynchronization_info = cJSON_GetObjectItemCaseSensitive(pro_se_authentication_info_requestJSON, "resynchronizationInfo"); if (resynchronization_info) { resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info); + if (!resynchronization_info_local_nonprim) { + ogs_error("OpenAPI_resynchronization_info_parseFromJSON failed [resynchronization_info]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(pro_se_authentication_info_requestJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/pro_se_authentication_info_result.c b/lib/sbi/openapi/model/pro_se_authentication_info_result.c index 29cbe1a3c..8c1665571 100644 --- a/lib/sbi/openapi/model/pro_se_authentication_info_result.c +++ b/lib/sbi/openapi/model/pro_se_authentication_info_result.c @@ -119,6 +119,10 @@ OpenAPI_pro_se_authentication_info_result_t *OpenAPI_pro_se_authentication_info_ prose_authentication_vectors = cJSON_GetObjectItemCaseSensitive(pro_se_authentication_info_resultJSON, "proseAuthenticationVectors"); if (prose_authentication_vectors) { prose_authentication_vectors_local_nonprim = OpenAPI_pro_se_authentication_vectors_parseFromJSON(prose_authentication_vectors); + if (!prose_authentication_vectors_local_nonprim) { + ogs_error("OpenAPI_pro_se_authentication_vectors_parseFromJSON failed [prose_authentication_vectors]"); + goto end; + } } supi = cJSON_GetObjectItemCaseSensitive(pro_se_authentication_info_resultJSON, "supi"); diff --git a/lib/sbi/openapi/model/pro_se_information.c b/lib/sbi/openapi/model/pro_se_information.c index 7ba6a2f47..6ac1885ca 100644 --- a/lib/sbi/openapi/model/pro_se_information.c +++ b/lib/sbi/openapi/model/pro_se_information.c @@ -67,6 +67,10 @@ OpenAPI_pro_se_information_t *OpenAPI_pro_se_information_parseFromJSON(cJSON *pr n2_pc5_pro_se_pol = cJSON_GetObjectItemCaseSensitive(pro_se_informationJSON, "n2Pc5ProSePol"); if (n2_pc5_pro_se_pol) { n2_pc5_pro_se_pol_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(n2_pc5_pro_se_pol); + if (!n2_pc5_pro_se_pol_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [n2_pc5_pro_se_pol]"); + goto end; + } } pro_se_information_local_var = OpenAPI_pro_se_information_create ( diff --git a/lib/sbi/openapi/model/problem_details.c b/lib/sbi/openapi/model/problem_details.c index 40feeee5e..2f67b0b80 100644 --- a/lib/sbi/openapi/model/problem_details.c +++ b/lib/sbi/openapi/model/problem_details.c @@ -288,7 +288,6 @@ OpenAPI_problem_details_t *OpenAPI_problem_details_parseFromJSON(cJSON *problem_ OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -306,11 +305,19 @@ OpenAPI_problem_details_t *OpenAPI_problem_details_parseFromJSON(cJSON *problem_ access_token_error = cJSON_GetObjectItemCaseSensitive(problem_detailsJSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(problem_detailsJSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(problem_detailsJSON, "nrfId"); diff --git a/lib/sbi/openapi/model/problem_details_1.c b/lib/sbi/openapi/model/problem_details_1.c index 2f9f91afa..5dd21f841 100644 --- a/lib/sbi/openapi/model/problem_details_1.c +++ b/lib/sbi/openapi/model/problem_details_1.c @@ -288,7 +288,6 @@ OpenAPI_problem_details_1_t *OpenAPI_problem_details_1_parseFromJSON(cJSON *prob OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -306,11 +305,19 @@ OpenAPI_problem_details_1_t *OpenAPI_problem_details_1_parseFromJSON(cJSON *prob access_token_error = cJSON_GetObjectItemCaseSensitive(problem_details_1JSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(problem_details_1JSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(problem_details_1JSON, "nrfId"); diff --git a/lib/sbi/openapi/model/prose_context.c b/lib/sbi/openapi/model/prose_context.c index 1992d9da1..bef9f1986 100644 --- a/lib/sbi/openapi/model/prose_context.c +++ b/lib/sbi/openapi/model/prose_context.c @@ -189,6 +189,10 @@ OpenAPI_prose_context_t *OpenAPI_prose_context_parseFromJSON(cJSON *prose_contex pc5_qo_s_para = cJSON_GetObjectItemCaseSensitive(prose_contextJSON, "pc5QoSPara"); if (pc5_qo_s_para) { pc5_qo_s_para_local_nonprim = OpenAPI_pc5_qo_s_para_parseFromJSON(pc5_qo_s_para); + if (!pc5_qo_s_para_local_nonprim) { + ogs_error("OpenAPI_pc5_qo_s_para_parseFromJSON failed [pc5_qo_s_para]"); + goto end; + } } prose_context_local_var = OpenAPI_prose_context_create ( diff --git a/lib/sbi/openapi/model/prose_subscription_data.c b/lib/sbi/openapi/model/prose_subscription_data.c index ffd2540c5..9e05c95cc 100644 --- a/lib/sbi/openapi/model/prose_subscription_data.c +++ b/lib/sbi/openapi/model/prose_subscription_data.c @@ -108,6 +108,10 @@ OpenAPI_prose_subscription_data_t *OpenAPI_prose_subscription_data_parseFromJSON prose_service_auth = cJSON_GetObjectItemCaseSensitive(prose_subscription_dataJSON, "proseServiceAuth"); if (prose_service_auth) { prose_service_auth_local_nonprim = OpenAPI_prose_service_auth_parseFromJSON(prose_service_auth); + if (!prose_service_auth_local_nonprim) { + ogs_error("OpenAPI_prose_service_auth_parseFromJSON failed [prose_service_auth]"); + goto end; + } } nr_ue_pc5_ambr = cJSON_GetObjectItemCaseSensitive(prose_subscription_dataJSON, "nrUePc5Ambr"); @@ -136,7 +140,6 @@ OpenAPI_prose_subscription_data_t *OpenAPI_prose_subscription_data_parseFromJSON OpenAPI_pro_se_allowed_plmn_t *prose_allowed_plmnItem = OpenAPI_pro_se_allowed_plmn_parseFromJSON(prose_allowed_plmn_local); if (!prose_allowed_plmnItem) { ogs_error("No prose_allowed_plmnItem"); - OpenAPI_list_free(prose_allowed_plmnList); goto end; } OpenAPI_list_add(prose_allowed_plmnList, prose_allowed_plmnItem); diff --git a/lib/sbi/openapi/model/protection_policy.c b/lib/sbi/openapi/model/protection_policy.c index 0041084d3..54d8c7705 100644 --- a/lib/sbi/openapi/model/protection_policy.c +++ b/lib/sbi/openapi/model/protection_policy.c @@ -115,7 +115,6 @@ OpenAPI_protection_policy_t *OpenAPI_protection_policy_parseFromJSON(cJSON *prot OpenAPI_api_ie_mapping_t *api_ie_mapping_listItem = OpenAPI_api_ie_mapping_parseFromJSON(api_ie_mapping_list_local); if (!api_ie_mapping_listItem) { ogs_error("No api_ie_mapping_listItem"); - OpenAPI_list_free(api_ie_mapping_listList); goto end; } OpenAPI_list_add(api_ie_mapping_listList, api_ie_mapping_listItem); diff --git a/lib/sbi/openapi/model/provisioned_data_sets.c b/lib/sbi/openapi/model/provisioned_data_sets.c index 3a22d08a1..9149298ec 100644 --- a/lib/sbi/openapi/model/provisioned_data_sets.c +++ b/lib/sbi/openapi/model/provisioned_data_sets.c @@ -382,81 +382,145 @@ OpenAPI_provisioned_data_sets_t *OpenAPI_provisioned_data_sets_parseFromJSON(cJS am_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "amData"); if (am_data) { am_data_local_nonprim = OpenAPI_access_and_mobility_subscription_data_parseFromJSON(am_data); + if (!am_data_local_nonprim) { + ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON failed [am_data]"); + goto end; + } } smf_sel_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "smfSelData"); if (smf_sel_data) { smf_sel_data_local_nonprim = OpenAPI_smf_selection_subscription_data_parseFromJSON(smf_sel_data); + if (!smf_sel_data_local_nonprim) { + ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON failed [smf_sel_data]"); + goto end; + } } sms_subs_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "smsSubsData"); if (sms_subs_data) { sms_subs_data_local_nonprim = OpenAPI_sms_subscription_data_parseFromJSON(sms_subs_data); + if (!sms_subs_data_local_nonprim) { + ogs_error("OpenAPI_sms_subscription_data_parseFromJSON failed [sms_subs_data]"); + goto end; + } } sm_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "smData"); if (sm_data) { sm_data_local_nonprim = OpenAPI_sm_subs_data_parseFromJSON(sm_data); + if (!sm_data_local_nonprim) { + ogs_error("OpenAPI_sm_subs_data_parseFromJSON failed [sm_data]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } sms_mng_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "smsMngData"); if (sms_mng_data) { sms_mng_data_local_nonprim = OpenAPI_sms_management_subscription_data_parseFromJSON(sms_mng_data); + if (!sms_mng_data_local_nonprim) { + ogs_error("OpenAPI_sms_management_subscription_data_parseFromJSON failed [sms_mng_data]"); + goto end; + } } lcs_privacy_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "lcsPrivacyData"); if (lcs_privacy_data) { lcs_privacy_data_local_nonprim = OpenAPI_lcs_privacy_data_parseFromJSON(lcs_privacy_data); + if (!lcs_privacy_data_local_nonprim) { + ogs_error("OpenAPI_lcs_privacy_data_parseFromJSON failed [lcs_privacy_data]"); + goto end; + } } lcs_mo_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "lcsMoData"); if (lcs_mo_data) { lcs_mo_data_local_nonprim = OpenAPI_lcs_mo_data_parseFromJSON(lcs_mo_data); + if (!lcs_mo_data_local_nonprim) { + ogs_error("OpenAPI_lcs_mo_data_parseFromJSON failed [lcs_mo_data]"); + goto end; + } } lcs_bca_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "lcsBcaData"); if (lcs_bca_data) { lcs_bca_data_local_nonprim = OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON(lcs_bca_data); + if (!lcs_bca_data_local_nonprim) { + ogs_error("OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON failed [lcs_bca_data]"); + goto end; + } } v2x_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "v2xData"); if (v2x_data) { v2x_data_local_nonprim = OpenAPI_v2x_subscription_data_parseFromJSON(v2x_data); + if (!v2x_data_local_nonprim) { + ogs_error("OpenAPI_v2x_subscription_data_parseFromJSON failed [v2x_data]"); + goto end; + } } prose_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "proseData"); if (prose_data) { prose_data_local_nonprim = OpenAPI_prose_subscription_data_parseFromJSON(prose_data); + if (!prose_data_local_nonprim) { + ogs_error("OpenAPI_prose_subscription_data_parseFromJSON failed [prose_data]"); + goto end; + } } odb_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "odbData"); if (odb_data) { odb_data_local_nonprim = OpenAPI_odb_data_parseFromJSON(odb_data); + if (!odb_data_local_nonprim) { + ogs_error("OpenAPI_odb_data_parseFromJSON failed [odb_data]"); + goto end; + } } ee_profile_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "eeProfileData"); if (ee_profile_data) { ee_profile_data_local_nonprim = OpenAPI_ee_profile_data_parseFromJSON(ee_profile_data); + if (!ee_profile_data_local_nonprim) { + ogs_error("OpenAPI_ee_profile_data_parseFromJSON failed [ee_profile_data]"); + goto end; + } } pp_profile_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "ppProfileData"); if (pp_profile_data) { pp_profile_data_local_nonprim = OpenAPI_pp_profile_data_parseFromJSON(pp_profile_data); + if (!pp_profile_data_local_nonprim) { + ogs_error("OpenAPI_pp_profile_data_parseFromJSON failed [pp_profile_data]"); + goto end; + } } nidd_auth_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "niddAuthData"); if (nidd_auth_data) { nidd_auth_data_local_nonprim = OpenAPI_authorization_data_parseFromJSON(nidd_auth_data); + if (!nidd_auth_data_local_nonprim) { + ogs_error("OpenAPI_authorization_data_parseFromJSON failed [nidd_auth_data]"); + goto end; + } } mbs_subscription_data = cJSON_GetObjectItemCaseSensitive(provisioned_data_setsJSON, "mbsSubscriptionData"); if (mbs_subscription_data) { mbs_subscription_data_local_nonprim = OpenAPI_mbs_subscription_data_1_parseFromJSON(mbs_subscription_data); + if (!mbs_subscription_data_local_nonprim) { + ogs_error("OpenAPI_mbs_subscription_data_1_parseFromJSON failed [mbs_subscription_data]"); + goto end; + } } provisioned_data_sets_local_var = OpenAPI_provisioned_data_sets_create ( diff --git a/lib/sbi/openapi/model/pws_information.c b/lib/sbi/openapi/model/pws_information.c index 3e07c20a4..7858fc1fe 100644 --- a/lib/sbi/openapi/model/pws_information.c +++ b/lib/sbi/openapi/model/pws_information.c @@ -175,6 +175,10 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_parseFromJSON(cJSON *pws_info goto end; } pws_container_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(pws_container); + if (!pws_container_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [pws_container]"); + goto end; + } bc_empty_area_list = cJSON_GetObjectItemCaseSensitive(pws_informationJSON, "bcEmptyAreaList"); if (bc_empty_area_list) { @@ -194,7 +198,6 @@ OpenAPI_pws_information_t *OpenAPI_pws_information_parseFromJSON(cJSON *pws_info OpenAPI_global_ran_node_id_t *bc_empty_area_listItem = OpenAPI_global_ran_node_id_parseFromJSON(bc_empty_area_list_local); if (!bc_empty_area_listItem) { ogs_error("No bc_empty_area_listItem"); - OpenAPI_list_free(bc_empty_area_listList); goto end; } OpenAPI_list_add(bc_empty_area_listList, bc_empty_area_listItem); diff --git a/lib/sbi/openapi/model/pws_response_data.c b/lib/sbi/openapi/model/pws_response_data.c index 101017fe0..3bf02746a 100644 --- a/lib/sbi/openapi/model/pws_response_data.c +++ b/lib/sbi/openapi/model/pws_response_data.c @@ -142,7 +142,6 @@ OpenAPI_pws_response_data_t *OpenAPI_pws_response_data_parseFromJSON(cJSON *pws_ OpenAPI_tai_t *unknown_tai_listItem = OpenAPI_tai_parseFromJSON(unknown_tai_list_local); if (!unknown_tai_listItem) { ogs_error("No unknown_tai_listItem"); - OpenAPI_list_free(unknown_tai_listList); goto end; } OpenAPI_list_add(unknown_tai_listList, unknown_tai_listItem); diff --git a/lib/sbi/openapi/model/qos_data.c b/lib/sbi/openapi/model/qos_data.c index c5a5c505b..d1217fde2 100644 --- a/lib/sbi/openapi/model/qos_data.c +++ b/lib/sbi/openapi/model/qos_data.c @@ -363,6 +363,10 @@ OpenAPI_qos_data_t *OpenAPI_qos_data_parseFromJSON(cJSON *qos_dataJSON) arp = cJSON_GetObjectItemCaseSensitive(qos_dataJSON, "arp"); if (arp) { arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } } qnc = cJSON_GetObjectItemCaseSensitive(qos_dataJSON, "qnc"); diff --git a/lib/sbi/openapi/model/qos_flow_add_modify_request_item.c b/lib/sbi/openapi/model/qos_flow_add_modify_request_item.c index 19dbd0fe0..e6455ee62 100644 --- a/lib/sbi/openapi/model/qos_flow_add_modify_request_item.c +++ b/lib/sbi/openapi/model/qos_flow_add_modify_request_item.c @@ -160,6 +160,10 @@ OpenAPI_qos_flow_add_modify_request_item_t *OpenAPI_qos_flow_add_modify_request_ qos_flow_profile = cJSON_GetObjectItemCaseSensitive(qos_flow_add_modify_request_itemJSON, "qosFlowProfile"); if (qos_flow_profile) { qos_flow_profile_local_nonprim = OpenAPI_qos_flow_profile_parseFromJSON(qos_flow_profile); + if (!qos_flow_profile_local_nonprim) { + ogs_error("OpenAPI_qos_flow_profile_parseFromJSON failed [qos_flow_profile]"); + goto end; + } } associated_an_type = cJSON_GetObjectItemCaseSensitive(qos_flow_add_modify_request_itemJSON, "associatedAnType"); diff --git a/lib/sbi/openapi/model/qos_flow_item.c b/lib/sbi/openapi/model/qos_flow_item.c index df2a45607..cdf701012 100644 --- a/lib/sbi/openapi/model/qos_flow_item.c +++ b/lib/sbi/openapi/model/qos_flow_item.c @@ -145,6 +145,10 @@ OpenAPI_qos_flow_item_t *OpenAPI_qos_flow_item_parseFromJSON(cJSON *qos_flow_ite ng_ap_cause = cJSON_GetObjectItemCaseSensitive(qos_flow_itemJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } qos_flow_item_local_var = OpenAPI_qos_flow_item_create ( diff --git a/lib/sbi/openapi/model/qos_flow_profile.c b/lib/sbi/openapi/model/qos_flow_profile.c index ffbb7794f..cbb6e017b 100644 --- a/lib/sbi/openapi/model/qos_flow_profile.c +++ b/lib/sbi/openapi/model/qos_flow_profile.c @@ -193,21 +193,37 @@ OpenAPI_qos_flow_profile_t *OpenAPI_qos_flow_profile_parseFromJSON(cJSON *qos_fl non_dynamic5_qi = cJSON_GetObjectItemCaseSensitive(qos_flow_profileJSON, "nonDynamic5Qi"); if (non_dynamic5_qi) { non_dynamic5_qi_local_nonprim = OpenAPI_non_dynamic5_qi_parseFromJSON(non_dynamic5_qi); + if (!non_dynamic5_qi_local_nonprim) { + ogs_error("OpenAPI_non_dynamic5_qi_parseFromJSON failed [non_dynamic5_qi]"); + goto end; + } } dynamic5_qi = cJSON_GetObjectItemCaseSensitive(qos_flow_profileJSON, "dynamic5Qi"); if (dynamic5_qi) { dynamic5_qi_local_nonprim = OpenAPI_dynamic5_qi_parseFromJSON(dynamic5_qi); + if (!dynamic5_qi_local_nonprim) { + ogs_error("OpenAPI_dynamic5_qi_parseFromJSON failed [dynamic5_qi]"); + goto end; + } } arp = cJSON_GetObjectItemCaseSensitive(qos_flow_profileJSON, "arp"); if (arp) { arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } } gbr_qos_flow_info = cJSON_GetObjectItemCaseSensitive(qos_flow_profileJSON, "gbrQosFlowInfo"); if (gbr_qos_flow_info) { gbr_qos_flow_info_local_nonprim = OpenAPI_gbr_qos_flow_information_parseFromJSON(gbr_qos_flow_info); + if (!gbr_qos_flow_info_local_nonprim) { + ogs_error("OpenAPI_gbr_qos_flow_information_parseFromJSON failed [gbr_qos_flow_info]"); + goto end; + } } rqa = cJSON_GetObjectItemCaseSensitive(qos_flow_profileJSON, "rqa"); diff --git a/lib/sbi/openapi/model/qos_flow_setup_item.c b/lib/sbi/openapi/model/qos_flow_setup_item.c index ccb34e7be..997264305 100644 --- a/lib/sbi/openapi/model/qos_flow_setup_item.c +++ b/lib/sbi/openapi/model/qos_flow_setup_item.c @@ -176,6 +176,10 @@ OpenAPI_qos_flow_setup_item_t *OpenAPI_qos_flow_setup_item_parseFromJSON(cJSON * qos_flow_profile = cJSON_GetObjectItemCaseSensitive(qos_flow_setup_itemJSON, "qosFlowProfile"); if (qos_flow_profile) { qos_flow_profile_local_nonprim = OpenAPI_qos_flow_profile_parseFromJSON(qos_flow_profile); + if (!qos_flow_profile_local_nonprim) { + ogs_error("OpenAPI_qos_flow_profile_parseFromJSON failed [qos_flow_profile]"); + goto end; + } } associated_an_type = cJSON_GetObjectItemCaseSensitive(qos_flow_setup_itemJSON, "associatedAnType"); diff --git a/lib/sbi/openapi/model/qos_flow_tunnel.c b/lib/sbi/openapi/model/qos_flow_tunnel.c index 524c41502..157285b36 100644 --- a/lib/sbi/openapi/model/qos_flow_tunnel.c +++ b/lib/sbi/openapi/model/qos_flow_tunnel.c @@ -128,6 +128,10 @@ OpenAPI_qos_flow_tunnel_t *OpenAPI_qos_flow_tunnel_parseFromJSON(cJSON *qos_flow goto end; } tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(tunnel_info); + if (!tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [tunnel_info]"); + goto end; + } qos_flow_tunnel_local_var = OpenAPI_qos_flow_tunnel_create ( qfi_listList, diff --git a/lib/sbi/openapi/model/qos_monitoring_report.c b/lib/sbi/openapi/model/qos_monitoring_report.c index d08fd5c79..ef9f8e42b 100644 --- a/lib/sbi/openapi/model/qos_monitoring_report.c +++ b/lib/sbi/openapi/model/qos_monitoring_report.c @@ -163,7 +163,6 @@ OpenAPI_qos_monitoring_report_t *OpenAPI_qos_monitoring_report_parseFromJSON(cJS OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/qos_notification_control_info.c b/lib/sbi/openapi/model/qos_notification_control_info.c index 635baf43f..01dff03ac 100644 --- a/lib/sbi/openapi/model/qos_notification_control_info.c +++ b/lib/sbi/openapi/model/qos_notification_control_info.c @@ -126,7 +126,6 @@ OpenAPI_qos_notification_control_info_t *OpenAPI_qos_notification_control_info_p OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/qos_sustainability_info.c b/lib/sbi/openapi/model/qos_sustainability_info.c index e996a0a5b..651fb709e 100644 --- a/lib/sbi/openapi/model/qos_sustainability_info.c +++ b/lib/sbi/openapi/model/qos_sustainability_info.c @@ -163,6 +163,10 @@ OpenAPI_qos_sustainability_info_t *OpenAPI_qos_sustainability_info_parseFromJSON area_info = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "areaInfo"); if (area_info) { area_info_local_nonprim = OpenAPI_network_area_info_parseFromJSON(area_info); + if (!area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [area_info]"); + goto end; + } } start_ts = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "startTs"); @@ -184,6 +188,10 @@ OpenAPI_qos_sustainability_info_t *OpenAPI_qos_sustainability_info_parseFromJSON qos_flow_ret_thd = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "qosFlowRetThd"); if (qos_flow_ret_thd) { qos_flow_ret_thd_local_nonprim = OpenAPI_retainability_threshold_parseFromJSON(qos_flow_ret_thd); + if (!qos_flow_ret_thd_local_nonprim) { + ogs_error("OpenAPI_retainability_threshold_parseFromJSON failed [qos_flow_ret_thd]"); + goto end; + } } ran_ue_throu_thd = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "ranUeThrouThd"); @@ -197,6 +205,10 @@ OpenAPI_qos_sustainability_info_t *OpenAPI_qos_sustainability_info_parseFromJSON snssai = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } confidence = cJSON_GetObjectItemCaseSensitive(qos_sustainability_infoJSON, "confidence"); diff --git a/lib/sbi/openapi/model/query_param_combination.c b/lib/sbi/openapi/model/query_param_combination.c index ede2b547b..11ff8fa12 100644 --- a/lib/sbi/openapi/model/query_param_combination.c +++ b/lib/sbi/openapi/model/query_param_combination.c @@ -93,7 +93,6 @@ OpenAPI_query_param_combination_t *OpenAPI_query_param_combination_parseFromJSON OpenAPI_query_parameter_t *query_paramsItem = OpenAPI_query_parameter_parseFromJSON(query_params_local); if (!query_paramsItem) { ogs_error("No query_paramsItem"); - OpenAPI_list_free(query_paramsList); goto end; } OpenAPI_list_add(query_paramsList, query_paramsItem); diff --git a/lib/sbi/openapi/model/ran_nas_rel_cause.c b/lib/sbi/openapi/model/ran_nas_rel_cause.c index b9b041b8b..65f6ce93c 100644 --- a/lib/sbi/openapi/model/ran_nas_rel_cause.c +++ b/lib/sbi/openapi/model/ran_nas_rel_cause.c @@ -105,6 +105,10 @@ OpenAPI_ran_nas_rel_cause_t *OpenAPI_ran_nas_rel_cause_parseFromJSON(cJSON *ran_ ng_ap_cause = cJSON_GetObjectItemCaseSensitive(ran_nas_rel_causeJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause = cJSON_GetObjectItemCaseSensitive(ran_nas_rel_causeJSON, "5gMmCause"); diff --git a/lib/sbi/openapi/model/rat_freq_information.c b/lib/sbi/openapi/model/rat_freq_information.c index 532078dd3..ec27081bb 100644 --- a/lib/sbi/openapi/model/rat_freq_information.c +++ b/lib/sbi/openapi/model/rat_freq_information.c @@ -168,11 +168,19 @@ OpenAPI_rat_freq_information_t *OpenAPI_rat_freq_information_parseFromJSON(cJSON svc_exp_threshold = cJSON_GetObjectItemCaseSensitive(rat_freq_informationJSON, "svcExpThreshold"); if (svc_exp_threshold) { svc_exp_threshold_local_nonprim = OpenAPI_threshold_level_parseFromJSON(svc_exp_threshold); + if (!svc_exp_threshold_local_nonprim) { + ogs_error("OpenAPI_threshold_level_parseFromJSON failed [svc_exp_threshold]"); + goto end; + } } matching_dir = cJSON_GetObjectItemCaseSensitive(rat_freq_informationJSON, "matchingDir"); if (matching_dir) { matching_dir_local_nonprim = OpenAPI_matching_direction_parseFromJSON(matching_dir); + if (!matching_dir_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [matching_dir]"); + goto end; + } } rat_freq_information_local_var = OpenAPI_rat_freq_information_create ( diff --git a/lib/sbi/openapi/model/reachability_for_data_configuration.c b/lib/sbi/openapi/model/reachability_for_data_configuration.c index c956f3f46..807a4ee8c 100644 --- a/lib/sbi/openapi/model/reachability_for_data_configuration.c +++ b/lib/sbi/openapi/model/reachability_for_data_configuration.c @@ -84,6 +84,10 @@ OpenAPI_reachability_for_data_configuration_t *OpenAPI_reachability_for_data_con goto end; } report_cfg_local_nonprim = OpenAPI_reachability_for_data_report_config_parseFromJSON(report_cfg); + if (!report_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_data_report_config_parseFromJSON failed [report_cfg]"); + goto end; + } min_interval = cJSON_GetObjectItemCaseSensitive(reachability_for_data_configurationJSON, "minInterval"); if (min_interval) { diff --git a/lib/sbi/openapi/model/reachability_for_data_configuration_1.c b/lib/sbi/openapi/model/reachability_for_data_configuration_1.c index 9cff10be0..b6ed1601d 100644 --- a/lib/sbi/openapi/model/reachability_for_data_configuration_1.c +++ b/lib/sbi/openapi/model/reachability_for_data_configuration_1.c @@ -84,6 +84,10 @@ OpenAPI_reachability_for_data_configuration_1_t *OpenAPI_reachability_for_data_c goto end; } report_cfg_local_nonprim = OpenAPI_reachability_for_data_report_config_parseFromJSON(report_cfg); + if (!report_cfg_local_nonprim) { + ogs_error("OpenAPI_reachability_for_data_report_config_parseFromJSON failed [report_cfg]"); + goto end; + } min_interval = cJSON_GetObjectItemCaseSensitive(reachability_for_data_configuration_1JSON, "minInterval"); if (min_interval) { diff --git a/lib/sbi/openapi/model/redundant_transmission_exp_info.c b/lib/sbi/openapi/model/redundant_transmission_exp_info.c index 7aad2a5a8..458625190 100644 --- a/lib/sbi/openapi/model/redundant_transmission_exp_info.c +++ b/lib/sbi/openapi/model/redundant_transmission_exp_info.c @@ -110,6 +110,10 @@ OpenAPI_redundant_transmission_exp_info_t *OpenAPI_redundant_transmission_exp_in spatial_valid_con = cJSON_GetObjectItemCaseSensitive(redundant_transmission_exp_infoJSON, "spatialValidCon"); if (spatial_valid_con) { spatial_valid_con_local_nonprim = OpenAPI_network_area_info_parseFromJSON(spatial_valid_con); + if (!spatial_valid_con_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [spatial_valid_con]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(redundant_transmission_exp_infoJSON, "dnn"); @@ -141,7 +145,6 @@ OpenAPI_redundant_transmission_exp_info_t *OpenAPI_redundant_transmission_exp_in OpenAPI_redundant_transmission_exp_per_ts_t *red_trans_expsItem = OpenAPI_redundant_transmission_exp_per_ts_parseFromJSON(red_trans_exps_local); if (!red_trans_expsItem) { ogs_error("No red_trans_expsItem"); - OpenAPI_list_free(red_trans_expsList); goto end; } OpenAPI_list_add(red_trans_expsList, red_trans_expsItem); diff --git a/lib/sbi/openapi/model/redundant_transmission_exp_per_ts.c b/lib/sbi/openapi/model/redundant_transmission_exp_per_ts.c index 5fd3ec49d..e86f7cdc0 100644 --- a/lib/sbi/openapi/model/redundant_transmission_exp_per_ts.c +++ b/lib/sbi/openapi/model/redundant_transmission_exp_per_ts.c @@ -152,6 +152,10 @@ OpenAPI_redundant_transmission_exp_per_ts_t *OpenAPI_redundant_transmission_exp_ goto end; } obsv_red_trans_exp_local_nonprim = OpenAPI_observed_redundant_trans_exp_parseFromJSON(obsv_red_trans_exp); + if (!obsv_red_trans_exp_local_nonprim) { + ogs_error("OpenAPI_observed_redundant_trans_exp_parseFromJSON failed [obsv_red_trans_exp]"); + goto end; + } red_trans_status = cJSON_GetObjectItemCaseSensitive(redundant_transmission_exp_per_tsJSON, "redTransStatus"); if (red_trans_status) { diff --git a/lib/sbi/openapi/model/redundant_transmission_exp_req.c b/lib/sbi/openapi/model/redundant_transmission_exp_req.c index 705a1e11b..44cad8d8b 100644 --- a/lib/sbi/openapi/model/redundant_transmission_exp_req.c +++ b/lib/sbi/openapi/model/redundant_transmission_exp_req.c @@ -88,11 +88,19 @@ OpenAPI_redundant_transmission_exp_req_t *OpenAPI_redundant_transmission_exp_req red_t_order_criter = cJSON_GetObjectItemCaseSensitive(redundant_transmission_exp_reqJSON, "redTOrderCriter"); if (red_t_order_criter) { red_t_order_criter_local_nonprim = OpenAPI_red_trans_exp_ordering_criterion_parseFromJSON(red_t_order_criter); + if (!red_t_order_criter_local_nonprim) { + ogs_error("OpenAPI_red_trans_exp_ordering_criterion_parseFromJSON failed [red_t_order_criter]"); + goto end; + } } order = cJSON_GetObjectItemCaseSensitive(redundant_transmission_exp_reqJSON, "order"); if (order) { order_local_nonprim = OpenAPI_matching_direction_parseFromJSON(order); + if (!order_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [order]"); + goto end; + } } redundant_transmission_exp_req_local_var = OpenAPI_redundant_transmission_exp_req_create ( diff --git a/lib/sbi/openapi/model/registration_context_container.c b/lib/sbi/openapi/model/registration_context_container.c index ee5d36a98..fae8bb4dd 100644 --- a/lib/sbi/openapi/model/registration_context_container.c +++ b/lib/sbi/openapi/model/registration_context_container.c @@ -445,6 +445,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } local_time_zone = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "localTimeZone"); if (local_time_zone) { @@ -481,6 +485,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container goto end; } ran_node_id_local_nonprim = OpenAPI_global_ran_node_id_parseFromJSON(ran_node_id); + if (!ran_node_id_local_nonprim) { + ogs_error("OpenAPI_global_ran_node_id_parseFromJSON failed [ran_node_id]"); + goto end; + } initial_amf_name = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "initialAmfName"); if (!initial_amf_name) { @@ -498,6 +506,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container goto end; } user_location_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location); + if (!user_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_location]"); + goto end; + } rrc_est_cause = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "rrcEstCause"); if (rrc_est_cause) { @@ -542,6 +554,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container allowed_nssai = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "allowedNssai"); if (allowed_nssai) { allowed_nssai_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai); + if (!allowed_nssai_local_nonprim) { + ogs_error("OpenAPI_allowed_nssai_parseFromJSON failed [allowed_nssai]"); + goto end; + } } configured_nssai = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "configuredNssai"); @@ -562,7 +578,6 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local); if (!configured_nssaiItem) { ogs_error("No configured_nssaiItem"); - OpenAPI_list_free(configured_nssaiList); goto end; } OpenAPI_list_add(configured_nssaiList, configured_nssaiItem); @@ -587,7 +602,6 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local); if (!rejected_nssai_in_plmnItem) { ogs_error("No rejected_nssai_in_plmnItem"); - OpenAPI_list_free(rejected_nssai_in_plmnList); goto end; } OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem); @@ -612,7 +626,6 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local); if (!rejected_nssai_in_taItem) { ogs_error("No rejected_nssai_in_taItem"); - OpenAPI_list_free(rejected_nssai_in_taList); goto end; } OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem); @@ -622,6 +635,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container selected_plmn_id = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "selectedPlmnId"); if (selected_plmn_id) { selected_plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(selected_plmn_id); + if (!selected_plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [selected_plmn_id]"); + goto end; + } } iab_node_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "iabNodeInd"); @@ -635,11 +652,19 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container ce_mode_b_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "ceModeBInd"); if (ce_mode_b_ind) { ce_mode_b_ind_local_nonprim = OpenAPI_ce_mode_b_ind_parseFromJSON(ce_mode_b_ind); + if (!ce_mode_b_ind_local_nonprim) { + ogs_error("OpenAPI_ce_mode_b_ind_parseFromJSON failed [ce_mode_b_ind]"); + goto end; + } } lte_m_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "lteMInd"); if (lte_m_ind) { lte_m_ind_local_nonprim = OpenAPI_lte_m_ind_parseFromJSON(lte_m_ind); + if (!lte_m_ind_local_nonprim) { + ogs_error("OpenAPI_lte_m_ind_parseFromJSON failed [lte_m_ind]"); + goto end; + } } authenticated_ind = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "authenticatedInd"); @@ -653,6 +678,10 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container npn_access_info = cJSON_GetObjectItemCaseSensitive(registration_context_containerJSON, "npnAccessInfo"); if (npn_access_info) { npn_access_info_local_nonprim = OpenAPI_npn_access_info_parseFromJSON(npn_access_info); + if (!npn_access_info_local_nonprim) { + ogs_error("OpenAPI_npn_access_info_parseFromJSON failed [npn_access_info]"); + goto end; + } } registration_context_container_local_var = OpenAPI_registration_context_container_create ( diff --git a/lib/sbi/openapi/model/registration_data_sets.c b/lib/sbi/openapi/model/registration_data_sets.c index 624230d3f..f1490f226 100644 --- a/lib/sbi/openapi/model/registration_data_sets.c +++ b/lib/sbi/openapi/model/registration_data_sets.c @@ -193,36 +193,64 @@ OpenAPI_registration_data_sets_t *OpenAPI_registration_data_sets_parseFromJSON(c amf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "amf3Gpp"); if (amf3_gpp) { amf3_gpp_local_nonprim = OpenAPI_amf3_gpp_access_registration_parseFromJSON(amf3_gpp); + if (!amf3_gpp_local_nonprim) { + ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON failed [amf3_gpp]"); + goto end; + } } amf_non3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "amfNon3Gpp"); if (amf_non3_gpp) { amf_non3_gpp_local_nonprim = OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(amf_non3_gpp); + if (!amf_non3_gpp_local_nonprim) { + ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON failed [amf_non3_gpp]"); + goto end; + } } smf_registration = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smfRegistration"); if (smf_registration) { smf_registration_local_nonprim = OpenAPI_smf_registration_info_parseFromJSON(smf_registration); + if (!smf_registration_local_nonprim) { + ogs_error("OpenAPI_smf_registration_info_parseFromJSON failed [smf_registration]"); + goto end; + } } smsf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smsf3Gpp"); if (smsf3_gpp) { smsf3_gpp_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp); + if (!smsf3_gpp_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf3_gpp]"); + goto end; + } } smsf_non3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smsfNon3Gpp"); if (smsf_non3_gpp) { smsf_non3_gpp_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf_non3_gpp); + if (!smsf_non3_gpp_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf_non3_gpp]"); + goto end; + } } ip_sm_gw = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "ipSmGw"); if (ip_sm_gw) { ip_sm_gw_local_nonprim = OpenAPI_ip_sm_gw_registration_parseFromJSON(ip_sm_gw); + if (!ip_sm_gw_local_nonprim) { + ogs_error("OpenAPI_ip_sm_gw_registration_parseFromJSON failed [ip_sm_gw]"); + goto end; + } } nwdaf_registration = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "nwdafRegistration"); if (nwdaf_registration) { nwdaf_registration_local_nonprim = OpenAPI_nwdaf_registration_info_parseFromJSON(nwdaf_registration); + if (!nwdaf_registration_local_nonprim) { + ogs_error("OpenAPI_nwdaf_registration_info_parseFromJSON failed [nwdaf_registration]"); + goto end; + } } registration_data_sets_local_var = OpenAPI_registration_data_sets_create ( diff --git a/lib/sbi/openapi/model/registration_location_info.c b/lib/sbi/openapi/model/registration_location_info.c index 78f60ce5d..2f9ef6051 100644 --- a/lib/sbi/openapi/model/registration_location_info.c +++ b/lib/sbi/openapi/model/registration_location_info.c @@ -159,16 +159,28 @@ OpenAPI_registration_location_info_t *OpenAPI_registration_location_info_parseFr guami = cJSON_GetObjectItemCaseSensitive(registration_location_infoJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } plmn_id = cJSON_GetObjectItemCaseSensitive(registration_location_infoJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } vgmlc_address = cJSON_GetObjectItemCaseSensitive(registration_location_infoJSON, "vgmlcAddress"); if (vgmlc_address) { vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address); + if (!vgmlc_address_local_nonprim) { + ogs_error("OpenAPI_vgmlc_address_parseFromJSON failed [vgmlc_address]"); + goto end; + } } access_type_list = cJSON_GetObjectItemCaseSensitive(registration_location_infoJSON, "accessTypeList"); diff --git a/lib/sbi/openapi/model/release_data.c b/lib/sbi/openapi/model/release_data.c index 8eaaa6358..b329ef81c 100644 --- a/lib/sbi/openapi/model/release_data.c +++ b/lib/sbi/openapi/model/release_data.c @@ -272,6 +272,10 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS ng_ap_cause = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause_value = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "5gMmCauseValue"); @@ -285,6 +289,10 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS ue_location = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "ueTimeZone"); @@ -298,6 +306,10 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS add_ue_location = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } secondary_rat_usage_report = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "secondaryRatUsageReport"); @@ -318,7 +330,6 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS OpenAPI_secondary_rat_usage_report_t *secondary_rat_usage_reportItem = OpenAPI_secondary_rat_usage_report_parseFromJSON(secondary_rat_usage_report_local); if (!secondary_rat_usage_reportItem) { ogs_error("No secondary_rat_usage_reportItem"); - OpenAPI_list_free(secondary_rat_usage_reportList); goto end; } OpenAPI_list_add(secondary_rat_usage_reportList, secondary_rat_usage_reportItem); @@ -343,7 +354,6 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS OpenAPI_secondary_rat_usage_info_t *secondary_rat_usage_infoItem = OpenAPI_secondary_rat_usage_info_parseFromJSON(secondary_rat_usage_info_local); if (!secondary_rat_usage_infoItem) { ogs_error("No secondary_rat_usage_infoItem"); - OpenAPI_list_free(secondary_rat_usage_infoList); goto end; } OpenAPI_list_add(secondary_rat_usage_infoList, secondary_rat_usage_infoItem); @@ -353,16 +363,28 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS n4_info = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } release_data_local_var = OpenAPI_release_data_create ( diff --git a/lib/sbi/openapi/model/release_pdu_session_200_response.c b/lib/sbi/openapi/model/release_pdu_session_200_response.c index 898b74db2..ec6f19db1 100644 --- a/lib/sbi/openapi/model/release_pdu_session_200_response.c +++ b/lib/sbi/openapi/model/release_pdu_session_200_response.c @@ -118,6 +118,10 @@ OpenAPI_release_pdu_session_200_response_t *OpenAPI_release_pdu_session_200_resp json_data = cJSON_GetObjectItemCaseSensitive(release_pdu_session_200_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_released_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_released_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n4_information = cJSON_GetObjectItemCaseSensitive(release_pdu_session_200_responseJSON, "binaryDataN4Information"); diff --git a/lib/sbi/openapi/model/release_pdu_session_request.c b/lib/sbi/openapi/model/release_pdu_session_request.c index 2d0e0e3ce..17bdc03ba 100644 --- a/lib/sbi/openapi/model/release_pdu_session_request.c +++ b/lib/sbi/openapi/model/release_pdu_session_request.c @@ -118,6 +118,10 @@ OpenAPI_release_pdu_session_request_t *OpenAPI_release_pdu_session_request_parse json_data = cJSON_GetObjectItemCaseSensitive(release_pdu_session_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_release_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_release_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n4_information = cJSON_GetObjectItemCaseSensitive(release_pdu_session_requestJSON, "binaryDataN4Information"); diff --git a/lib/sbi/openapi/model/release_sm_context_request.c b/lib/sbi/openapi/model/release_sm_context_request.c index bbb3d8bf8..75cc88a1d 100644 --- a/lib/sbi/openapi/model/release_sm_context_request.c +++ b/lib/sbi/openapi/model/release_sm_context_request.c @@ -84,6 +84,10 @@ OpenAPI_release_sm_context_request_t *OpenAPI_release_sm_context_request_parseFr json_data = cJSON_GetObjectItemCaseSensitive(release_sm_context_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_sm_context_release_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_sm_context_release_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_sm_information = cJSON_GetObjectItemCaseSensitive(release_sm_context_requestJSON, "binaryDataN2SmInformation"); diff --git a/lib/sbi/openapi/model/released_data.c b/lib/sbi/openapi/model/released_data.c index b2fbb4df7..7f96725a9 100644 --- a/lib/sbi/openapi/model/released_data.c +++ b/lib/sbi/openapi/model/released_data.c @@ -151,26 +151,46 @@ OpenAPI_released_data_t *OpenAPI_released_data_parseFromJSON(cJSON *released_dat small_data_rate_status = cJSON_GetObjectItemCaseSensitive(released_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(released_dataJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } n4_info = cJSON_GetObjectItemCaseSensitive(released_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(released_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(released_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } released_data_local_var = OpenAPI_released_data_create ( diff --git a/lib/sbi/openapi/model/relocate_ue_context_request.c b/lib/sbi/openapi/model/relocate_ue_context_request.c index 6f79ace0f..236c6fdb0 100644 --- a/lib/sbi/openapi/model/relocate_ue_context_request.c +++ b/lib/sbi/openapi/model/relocate_ue_context_request.c @@ -373,6 +373,10 @@ OpenAPI_relocate_ue_context_request_t *OpenAPI_relocate_ue_context_request_parse json_data = cJSON_GetObjectItemCaseSensitive(relocate_ue_context_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_relocate_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_relocate_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_forward_relocation_request = cJSON_GetObjectItemCaseSensitive(relocate_ue_context_requestJSON, "binaryDataForwardRelocationRequest"); diff --git a/lib/sbi/openapi/model/reporting_information.c b/lib/sbi/openapi/model/reporting_information.c index af825e8af..cceeccca3 100644 --- a/lib/sbi/openapi/model/reporting_information.c +++ b/lib/sbi/openapi/model/reporting_information.c @@ -182,6 +182,10 @@ OpenAPI_reporting_information_t *OpenAPI_reporting_information_parseFromJSON(cJS notif_method = cJSON_GetObjectItemCaseSensitive(reporting_informationJSON, "notifMethod"); if (notif_method) { notif_method_local_nonprim = OpenAPI_notification_method_1_parseFromJSON(notif_method); + if (!notif_method_local_nonprim) { + ogs_error("OpenAPI_notification_method_1_parseFromJSON failed [notif_method]"); + goto end; + } } max_report_nbr = cJSON_GetObjectItemCaseSensitive(reporting_informationJSON, "maxReportNbr"); diff --git a/lib/sbi/openapi/model/reporting_options.c b/lib/sbi/openapi/model/reporting_options.c index daf22a421..da0bfb091 100644 --- a/lib/sbi/openapi/model/reporting_options.c +++ b/lib/sbi/openapi/model/reporting_options.c @@ -140,6 +140,10 @@ OpenAPI_reporting_options_t *OpenAPI_reporting_options_parseFromJSON(cJSON *repo report_mode = cJSON_GetObjectItemCaseSensitive(reporting_optionsJSON, "reportMode"); if (report_mode) { report_mode_local_nonprim = OpenAPI_event_report_mode_parseFromJSON(report_mode); + if (!report_mode_local_nonprim) { + ogs_error("OpenAPI_event_report_mode_parseFromJSON failed [report_mode]"); + goto end; + } } max_num_of_reports = cJSON_GetObjectItemCaseSensitive(reporting_optionsJSON, "maxNumOfReports"); diff --git a/lib/sbi/openapi/model/reporting_options_1.c b/lib/sbi/openapi/model/reporting_options_1.c index 1d8361e5d..9d04b920a 100644 --- a/lib/sbi/openapi/model/reporting_options_1.c +++ b/lib/sbi/openapi/model/reporting_options_1.c @@ -140,6 +140,10 @@ OpenAPI_reporting_options_1_t *OpenAPI_reporting_options_1_parseFromJSON(cJSON * report_mode = cJSON_GetObjectItemCaseSensitive(reporting_options_1JSON, "reportMode"); if (report_mode) { report_mode_local_nonprim = OpenAPI_event_report_mode_parseFromJSON(report_mode); + if (!report_mode_local_nonprim) { + ogs_error("OpenAPI_event_report_mode_parseFromJSON failed [report_mode]"); + goto end; + } } max_num_of_reports = cJSON_GetObjectItemCaseSensitive(reporting_options_1JSON, "maxNumOfReports"); diff --git a/lib/sbi/openapi/model/resources_allocation_info.c b/lib/sbi/openapi/model/resources_allocation_info.c index e1422cdee..ce57c419d 100644 --- a/lib/sbi/openapi/model/resources_allocation_info.c +++ b/lib/sbi/openapi/model/resources_allocation_info.c @@ -122,7 +122,6 @@ OpenAPI_resources_allocation_info_t *OpenAPI_resources_allocation_info_parseFrom OpenAPI_flows_t *flowsItem = OpenAPI_flows_parseFromJSON(flows_local); if (!flowsItem) { ogs_error("No flowsItem"); - OpenAPI_list_free(flowsList); goto end; } OpenAPI_list_add(flowsList, flowsItem); diff --git a/lib/sbi/openapi/model/retainability_threshold.c b/lib/sbi/openapi/model/retainability_threshold.c index 9bfbd59d2..1eea1bb71 100644 --- a/lib/sbi/openapi/model/retainability_threshold.c +++ b/lib/sbi/openapi/model/retainability_threshold.c @@ -99,6 +99,10 @@ OpenAPI_retainability_threshold_t *OpenAPI_retainability_threshold_parseFromJSON rel_time_unit = cJSON_GetObjectItemCaseSensitive(retainability_thresholdJSON, "relTimeUnit"); if (rel_time_unit) { rel_time_unit_local_nonprim = OpenAPI_time_unit_parseFromJSON(rel_time_unit); + if (!rel_time_unit_local_nonprim) { + ogs_error("OpenAPI_time_unit_parseFromJSON failed [rel_time_unit]"); + goto end; + } } rel_flow_ratio = cJSON_GetObjectItemCaseSensitive(retainability_thresholdJSON, "relFlowRatio"); diff --git a/lib/sbi/openapi/model/retrieved_data.c b/lib/sbi/openapi/model/retrieved_data.c index 718121b2b..556c6d0da 100644 --- a/lib/sbi/openapi/model/retrieved_data.c +++ b/lib/sbi/openapi/model/retrieved_data.c @@ -88,11 +88,19 @@ OpenAPI_retrieved_data_t *OpenAPI_retrieved_data_parseFromJSON(cJSON *retrieved_ small_data_rate_status = cJSON_GetObjectItemCaseSensitive(retrieved_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } af_coordination_info = cJSON_GetObjectItemCaseSensitive(retrieved_dataJSON, "afCoordinationInfo"); if (af_coordination_info) { af_coordination_info_local_nonprim = OpenAPI_af_coordination_info_parseFromJSON(af_coordination_info); + if (!af_coordination_info_local_nonprim) { + ogs_error("OpenAPI_af_coordination_info_parseFromJSON failed [af_coordination_info]"); + goto end; + } } retrieved_data_local_var = OpenAPI_retrieved_data_create ( diff --git a/lib/sbi/openapi/model/rm_info.c b/lib/sbi/openapi/model/rm_info.c index 18bdf577c..32c1de0f3 100644 --- a/lib/sbi/openapi/model/rm_info.c +++ b/lib/sbi/openapi/model/rm_info.c @@ -85,6 +85,10 @@ OpenAPI_rm_info_t *OpenAPI_rm_info_parseFromJSON(cJSON *rm_infoJSON) goto end; } rm_state_local_nonprim = OpenAPI_rm_state_parseFromJSON(rm_state); + if (!rm_state_local_nonprim) { + ogs_error("OpenAPI_rm_state_parseFromJSON failed [rm_state]"); + goto end; + } access_type = cJSON_GetObjectItemCaseSensitive(rm_infoJSON, "accessType"); if (!access_type) { diff --git a/lib/sbi/openapi/model/roaming_charging_profile.c b/lib/sbi/openapi/model/roaming_charging_profile.c index 065200ea1..c080f33fe 100644 --- a/lib/sbi/openapi/model/roaming_charging_profile.c +++ b/lib/sbi/openapi/model/roaming_charging_profile.c @@ -109,7 +109,6 @@ OpenAPI_roaming_charging_profile_t *OpenAPI_roaming_charging_profile_parseFromJS OpenAPI_trigger_t *triggersItem = OpenAPI_trigger_parseFromJSON(triggers_local); if (!triggersItem) { ogs_error("No triggersItem"); - OpenAPI_list_free(triggersList); goto end; } OpenAPI_list_add(triggersList, triggersItem); @@ -119,6 +118,10 @@ OpenAPI_roaming_charging_profile_t *OpenAPI_roaming_charging_profile_parseFromJS partial_record_method = cJSON_GetObjectItemCaseSensitive(roaming_charging_profileJSON, "partialRecordMethod"); if (partial_record_method) { partial_record_method_local_nonprim = OpenAPI_partial_record_method_parseFromJSON(partial_record_method); + if (!partial_record_method_local_nonprim) { + ogs_error("OpenAPI_partial_record_method_parseFromJSON failed [partial_record_method]"); + goto end; + } } roaming_charging_profile_local_var = OpenAPI_roaming_charging_profile_create ( diff --git a/lib/sbi/openapi/model/roaming_info_update.c b/lib/sbi/openapi/model/roaming_info_update.c index a9fd877f6..dc643535b 100644 --- a/lib/sbi/openapi/model/roaming_info_update.c +++ b/lib/sbi/openapi/model/roaming_info_update.c @@ -92,6 +92,10 @@ OpenAPI_roaming_info_update_t *OpenAPI_roaming_info_update_parseFromJSON(cJSON * goto end; } serving_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(serving_plmn); + if (!serving_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [serving_plmn]"); + goto end; + } roaming_info_update_local_var = OpenAPI_roaming_info_update_create ( roaming ? true : false, diff --git a/lib/sbi/openapi/model/route_selection_parameter_set.c b/lib/sbi/openapi/model/route_selection_parameter_set.c index 4d69dbe1a..6900ea7ef 100644 --- a/lib/sbi/openapi/model/route_selection_parameter_set.c +++ b/lib/sbi/openapi/model/route_selection_parameter_set.c @@ -155,6 +155,10 @@ OpenAPI_route_selection_parameter_set_t *OpenAPI_route_selection_parameter_set_p snssai = cJSON_GetObjectItemCaseSensitive(route_selection_parameter_setJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } precedence = cJSON_GetObjectItemCaseSensitive(route_selection_parameter_setJSON, "precedence"); @@ -183,7 +187,6 @@ OpenAPI_route_selection_parameter_set_t *OpenAPI_route_selection_parameter_set_p OpenAPI_geographical_area_t *spatial_validity_areasItem = OpenAPI_geographical_area_parseFromJSON(spatial_validity_areas_local); if (!spatial_validity_areasItem) { ogs_error("No spatial_validity_areasItem"); - OpenAPI_list_free(spatial_validity_areasList); goto end; } OpenAPI_list_add(spatial_validity_areasList, spatial_validity_areasItem); @@ -208,7 +211,6 @@ OpenAPI_route_selection_parameter_set_t *OpenAPI_route_selection_parameter_set_p OpenAPI_tai_1_t *spatial_validity_taisItem = OpenAPI_tai_1_parseFromJSON(spatial_validity_tais_local); if (!spatial_validity_taisItem) { ogs_error("No spatial_validity_taisItem"); - OpenAPI_list_free(spatial_validity_taisList); goto end; } OpenAPI_list_add(spatial_validity_taisList, spatial_validity_taisItem); diff --git a/lib/sbi/openapi/model/route_to_location.c b/lib/sbi/openapi/model/route_to_location.c index 94eede3d4..77c17bdb9 100644 --- a/lib/sbi/openapi/model/route_to_location.c +++ b/lib/sbi/openapi/model/route_to_location.c @@ -107,6 +107,10 @@ OpenAPI_route_to_location_t *OpenAPI_route_to_location_parseFromJSON(cJSON *rout route_info = cJSON_GetObjectItemCaseSensitive(route_to_locationJSON, "routeInfo"); if (route_info) { route_info_local_nonprim = OpenAPI_route_information_parseFromJSON(route_info); + if (!route_info_local_nonprim) { + ogs_error("OpenAPI_route_information_parseFromJSON failed [route_info]"); + goto end; + } } route_prof_id = cJSON_GetObjectItemCaseSensitive(route_to_locationJSON, "routeProfId"); diff --git a/lib/sbi/openapi/model/routing_area_id.c b/lib/sbi/openapi/model/routing_area_id.c index ba148a926..3db6093f7 100644 --- a/lib/sbi/openapi/model/routing_area_id.c +++ b/lib/sbi/openapi/model/routing_area_id.c @@ -104,6 +104,10 @@ OpenAPI_routing_area_id_t *OpenAPI_routing_area_id_parseFromJSON(cJSON *routing_ goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } lac = cJSON_GetObjectItemCaseSensitive(routing_area_idJSON, "lac"); if (!lac) { diff --git a/lib/sbi/openapi/model/routing_info_sm_response.c b/lib/sbi/openapi/model/routing_info_sm_response.c index 118849a38..43fb14db2 100644 --- a/lib/sbi/openapi/model/routing_info_sm_response.c +++ b/lib/sbi/openapi/model/routing_info_sm_response.c @@ -152,21 +152,37 @@ OpenAPI_routing_info_sm_response_t *OpenAPI_routing_info_sm_response_parseFromJS smsf3_gpp = cJSON_GetObjectItemCaseSensitive(routing_info_sm_responseJSON, "smsf3Gpp"); if (smsf3_gpp) { smsf3_gpp_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp); + if (!smsf3_gpp_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf3_gpp]"); + goto end; + } } smsf_non3_gpp = cJSON_GetObjectItemCaseSensitive(routing_info_sm_responseJSON, "smsfNon3Gpp"); if (smsf_non3_gpp) { smsf_non3_gpp_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf_non3_gpp); + if (!smsf_non3_gpp_local_nonprim) { + ogs_error("OpenAPI_smsf_registration_parseFromJSON failed [smsf_non3_gpp]"); + goto end; + } } ip_sm_gw = cJSON_GetObjectItemCaseSensitive(routing_info_sm_responseJSON, "ipSmGw"); if (ip_sm_gw) { ip_sm_gw_local_nonprim = OpenAPI_ip_sm_gw_info_parseFromJSON(ip_sm_gw); + if (!ip_sm_gw_local_nonprim) { + ogs_error("OpenAPI_ip_sm_gw_info_parseFromJSON failed [ip_sm_gw]"); + goto end; + } } sms_router = cJSON_GetObjectItemCaseSensitive(routing_info_sm_responseJSON, "smsRouter"); if (sms_router) { sms_router_local_nonprim = OpenAPI_sms_router_info_parseFromJSON(sms_router); + if (!sms_router_local_nonprim) { + ogs_error("OpenAPI_sms_router_info_parseFromJSON failed [sms_router]"); + goto end; + } } routing_info_sm_response_local_var = OpenAPI_routing_info_sm_response_create ( diff --git a/lib/sbi/openapi/model/rule_report.c b/lib/sbi/openapi/model/rule_report.c index 72e878aea..e1d34b625 100644 --- a/lib/sbi/openapi/model/rule_report.c +++ b/lib/sbi/openapi/model/rule_report.c @@ -254,6 +254,10 @@ OpenAPI_rule_report_t *OpenAPI_rule_report_parseFromJSON(cJSON *rule_reportJSON) fin_unit_act = cJSON_GetObjectItemCaseSensitive(rule_reportJSON, "finUnitAct"); if (fin_unit_act) { fin_unit_act_local_nonprim = OpenAPI_final_unit_action_parseFromJSON(fin_unit_act); + if (!fin_unit_act_local_nonprim) { + ogs_error("OpenAPI_final_unit_action_parseFromJSON failed [fin_unit_act]"); + goto end; + } } ran_nas_rel_causes = cJSON_GetObjectItemCaseSensitive(rule_reportJSON, "ranNasRelCauses"); @@ -274,7 +278,6 @@ OpenAPI_rule_report_t *OpenAPI_rule_report_parseFromJSON(cJSON *rule_reportJSON) OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local); if (!ran_nas_rel_causesItem) { ogs_error("No ran_nas_rel_causesItem"); - OpenAPI_list_free(ran_nas_rel_causesList); goto end; } OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem); diff --git a/lib/sbi/openapi/model/scp_domain_info.c b/lib/sbi/openapi/model/scp_domain_info.c index 02929ff73..b7e0604c6 100644 --- a/lib/sbi/openapi/model/scp_domain_info.c +++ b/lib/sbi/openapi/model/scp_domain_info.c @@ -156,7 +156,6 @@ OpenAPI_scp_domain_info_t *OpenAPI_scp_domain_info_parseFromJSON(cJSON *scp_doma OpenAPI_ip_end_point_t *scp_ip_end_pointsItem = OpenAPI_ip_end_point_parseFromJSON(scp_ip_end_points_local); if (!scp_ip_end_pointsItem) { ogs_error("No scp_ip_end_pointsItem"); - OpenAPI_list_free(scp_ip_end_pointsList); goto end; } OpenAPI_list_add(scp_ip_end_pointsList, scp_ip_end_pointsItem); diff --git a/lib/sbi/openapi/model/scp_domain_routing_info_notification.c b/lib/sbi/openapi/model/scp_domain_routing_info_notification.c index b1c5f3672..b2ed263a5 100644 --- a/lib/sbi/openapi/model/scp_domain_routing_info_notification.c +++ b/lib/sbi/openapi/model/scp_domain_routing_info_notification.c @@ -84,6 +84,10 @@ OpenAPI_scp_domain_routing_info_notification_t *OpenAPI_scp_domain_routing_info_ goto end; } routing_info_local_nonprim = OpenAPI_scp_domain_routing_information_parseFromJSON(routing_info); + if (!routing_info_local_nonprim) { + ogs_error("OpenAPI_scp_domain_routing_information_parseFromJSON failed [routing_info]"); + goto end; + } local_ind = cJSON_GetObjectItemCaseSensitive(scp_domain_routing_info_notificationJSON, "localInd"); if (local_ind) { diff --git a/lib/sbi/openapi/model/scp_info.c b/lib/sbi/openapi/model/scp_info.c index 4645a9de4..cc979847a 100644 --- a/lib/sbi/openapi/model/scp_info.c +++ b/lib/sbi/openapi/model/scp_info.c @@ -511,7 +511,6 @@ OpenAPI_scp_info_t *OpenAPI_scp_info_parseFromJSON(cJSON *scp_infoJSON) OpenAPI_ipv4_address_range_t *ipv4_addr_rangesItem = OpenAPI_ipv4_address_range_parseFromJSON(ipv4_addr_ranges_local); if (!ipv4_addr_rangesItem) { ogs_error("No ipv4_addr_rangesItem"); - OpenAPI_list_free(ipv4_addr_rangesList); goto end; } OpenAPI_list_add(ipv4_addr_rangesList, ipv4_addr_rangesItem); @@ -536,7 +535,6 @@ OpenAPI_scp_info_t *OpenAPI_scp_info_parseFromJSON(cJSON *scp_infoJSON) OpenAPI_ipv6_prefix_range_t *ipv6_prefix_rangesItem = OpenAPI_ipv6_prefix_range_parseFromJSON(ipv6_prefix_ranges_local); if (!ipv6_prefix_rangesItem) { ogs_error("No ipv6_prefix_rangesItem"); - OpenAPI_list_free(ipv6_prefix_rangesList); goto end; } OpenAPI_list_add(ipv6_prefix_rangesList, ipv6_prefix_rangesItem); @@ -582,7 +580,6 @@ OpenAPI_scp_info_t *OpenAPI_scp_info_parseFromJSON(cJSON *scp_infoJSON) OpenAPI_plmn_id_t *remote_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(remote_plmn_list_local); if (!remote_plmn_listItem) { ogs_error("No remote_plmn_listItem"); - OpenAPI_list_free(remote_plmn_listList); goto end; } OpenAPI_list_add(remote_plmn_listList, remote_plmn_listItem); @@ -607,7 +604,6 @@ OpenAPI_scp_info_t *OpenAPI_scp_info_parseFromJSON(cJSON *scp_infoJSON) OpenAPI_plmn_id_nid_t *remote_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(remote_snpn_list_local); if (!remote_snpn_listItem) { ogs_error("No remote_snpn_listItem"); - OpenAPI_list_free(remote_snpn_listList); goto end; } OpenAPI_list_add(remote_snpn_listList, remote_snpn_listItem); diff --git a/lib/sbi/openapi/model/sdm_subscription.c b/lib/sbi/openapi/model/sdm_subscription.c index 516d04684..acc3231be 100644 --- a/lib/sbi/openapi/model/sdm_subscription.c +++ b/lib/sbi/openapi/model/sdm_subscription.c @@ -420,6 +420,10 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su single_nssai = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "dnn"); @@ -441,6 +445,10 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su plmn_id = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } immediate_report = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "immediateReport"); @@ -454,6 +462,10 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su report = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "report"); if (report) { report_local_nonprim = OpenAPI_immediate_report_parseFromJSON(report); + if (!report_local_nonprim) { + ogs_error("OpenAPI_immediate_report_parseFromJSON failed [report]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "supportedFeatures"); @@ -467,6 +479,10 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su context_info = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } nf_change_filter = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "nfChangeFilter"); @@ -509,6 +525,10 @@ OpenAPI_sdm_subscription_t *OpenAPI_sdm_subscription_parseFromJSON(cJSON *sdm_su ue_con_smf_data_sub_filter = cJSON_GetObjectItemCaseSensitive(sdm_subscriptionJSON, "ueConSmfDataSubFilter"); if (ue_con_smf_data_sub_filter) { ue_con_smf_data_sub_filter_local_nonprim = OpenAPI_ue_context_in_smf_data_sub_filter_parseFromJSON(ue_con_smf_data_sub_filter); + if (!ue_con_smf_data_sub_filter_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smf_data_sub_filter_parseFromJSON failed [ue_con_smf_data_sub_filter]"); + goto end; + } } sdm_subscription_local_var = OpenAPI_sdm_subscription_create ( diff --git a/lib/sbi/openapi/model/sdm_subscription_1.c b/lib/sbi/openapi/model/sdm_subscription_1.c index 8de49fdc0..a2c0fa3e4 100644 --- a/lib/sbi/openapi/model/sdm_subscription_1.c +++ b/lib/sbi/openapi/model/sdm_subscription_1.c @@ -420,6 +420,10 @@ OpenAPI_sdm_subscription_1_t *OpenAPI_sdm_subscription_1_parseFromJSON(cJSON *sd single_nssai = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "dnn"); @@ -441,6 +445,10 @@ OpenAPI_sdm_subscription_1_t *OpenAPI_sdm_subscription_1_parseFromJSON(cJSON *sd plmn_id = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } } immediate_report = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "immediateReport"); @@ -454,6 +462,10 @@ OpenAPI_sdm_subscription_1_t *OpenAPI_sdm_subscription_1_parseFromJSON(cJSON *sd report = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "report"); if (report) { report_local_nonprim = OpenAPI_immediate_report_parseFromJSON(report); + if (!report_local_nonprim) { + ogs_error("OpenAPI_immediate_report_parseFromJSON failed [report]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "supportedFeatures"); @@ -467,6 +479,10 @@ OpenAPI_sdm_subscription_1_t *OpenAPI_sdm_subscription_1_parseFromJSON(cJSON *sd context_info = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } nf_change_filter = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "nfChangeFilter"); @@ -509,6 +525,10 @@ OpenAPI_sdm_subscription_1_t *OpenAPI_sdm_subscription_1_parseFromJSON(cJSON *sd ue_con_smf_data_sub_filter = cJSON_GetObjectItemCaseSensitive(sdm_subscription_1JSON, "ueConSmfDataSubFilter"); if (ue_con_smf_data_sub_filter) { ue_con_smf_data_sub_filter_local_nonprim = OpenAPI_ue_context_in_smf_data_sub_filter_1_parseFromJSON(ue_con_smf_data_sub_filter); + if (!ue_con_smf_data_sub_filter_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smf_data_sub_filter_1_parseFromJSON failed [ue_con_smf_data_sub_filter]"); + goto end; + } } sdm_subscription_1_local_var = OpenAPI_sdm_subscription_1_create ( diff --git a/lib/sbi/openapi/model/seaf_data.c b/lib/sbi/openapi/model/seaf_data.c index f77700d31..a18a3d82c 100644 --- a/lib/sbi/openapi/model/seaf_data.c +++ b/lib/sbi/openapi/model/seaf_data.c @@ -145,6 +145,10 @@ OpenAPI_seaf_data_t *OpenAPI_seaf_data_parseFromJSON(cJSON *seaf_dataJSON) goto end; } ng_ksi_local_nonprim = OpenAPI_ng_ksi_parseFromJSON(ng_ksi); + if (!ng_ksi_local_nonprim) { + ogs_error("OpenAPI_ng_ksi_parseFromJSON failed [ng_ksi]"); + goto end; + } key_amf = cJSON_GetObjectItemCaseSensitive(seaf_dataJSON, "keyAmf"); if (!key_amf) { @@ -152,6 +156,10 @@ OpenAPI_seaf_data_t *OpenAPI_seaf_data_parseFromJSON(cJSON *seaf_dataJSON) goto end; } key_amf_local_nonprim = OpenAPI_key_amf_parseFromJSON(key_amf); + if (!key_amf_local_nonprim) { + ogs_error("OpenAPI_key_amf_parseFromJSON failed [key_amf]"); + goto end; + } nh = cJSON_GetObjectItemCaseSensitive(seaf_dataJSON, "nh"); if (nh) { diff --git a/lib/sbi/openapi/model/search_result.c b/lib/sbi/openapi/model/search_result.c index 7aaf9e3e1..9b3aff9a4 100644 --- a/lib/sbi/openapi/model/search_result.c +++ b/lib/sbi/openapi/model/search_result.c @@ -243,7 +243,6 @@ OpenAPI_search_result_t *OpenAPI_search_result_parseFromJSON(cJSON *search_resul OpenAPI_nf_profile_t *nf_instancesItem = OpenAPI_nf_profile_parseFromJSON(nf_instances_local); if (!nf_instancesItem) { ogs_error("No nf_instancesItem"); - OpenAPI_list_free(nf_instancesList); goto end; } OpenAPI_list_add(nf_instancesList, nf_instancesItem); @@ -268,6 +267,10 @@ OpenAPI_search_result_t *OpenAPI_search_result_parseFromJSON(cJSON *search_resul preferred_search = cJSON_GetObjectItemCaseSensitive(search_resultJSON, "preferredSearch"); if (preferred_search) { preferred_search_local_nonprim = OpenAPI_preferred_search_parseFromJSON(preferred_search); + if (!preferred_search_local_nonprim) { + ogs_error("OpenAPI_preferred_search_parseFromJSON failed [preferred_search]"); + goto end; + } } nrf_supported_features = cJSON_GetObjectItemCaseSensitive(search_resultJSON, "nrfSupportedFeatures"); @@ -315,6 +318,10 @@ OpenAPI_search_result_t *OpenAPI_search_result_parseFromJSON(cJSON *search_resul no_profile_match_info = cJSON_GetObjectItemCaseSensitive(search_resultJSON, "noProfileMatchInfo"); if (no_profile_match_info) { no_profile_match_info_local_nonprim = OpenAPI_no_profile_match_info_parseFromJSON(no_profile_match_info); + if (!no_profile_match_info_local_nonprim) { + ogs_error("OpenAPI_no_profile_match_info_parseFromJSON failed [no_profile_match_info]"); + goto end; + } } search_result_local_var = OpenAPI_search_result_create ( diff --git a/lib/sbi/openapi/model/sec_negotiate_req_data.c b/lib/sbi/openapi/model/sec_negotiate_req_data.c index 4c75d5ad0..8d1606c40 100644 --- a/lib/sbi/openapi/model/sec_negotiate_req_data.c +++ b/lib/sbi/openapi/model/sec_negotiate_req_data.c @@ -289,7 +289,6 @@ OpenAPI_sec_negotiate_req_data_t *OpenAPI_sec_negotiate_req_data_parseFromJSON(c OpenAPI_plmn_id_t *plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(plmn_id_list_local); if (!plmn_id_listItem) { ogs_error("No plmn_id_listItem"); - OpenAPI_list_free(plmn_id_listList); goto end; } OpenAPI_list_add(plmn_id_listList, plmn_id_listItem); @@ -314,7 +313,6 @@ OpenAPI_sec_negotiate_req_data_t *OpenAPI_sec_negotiate_req_data_parseFromJSON(c OpenAPI_plmn_id_nid_t *snpn_id_listItem = OpenAPI_plmn_id_nid_parseFromJSON(snpn_id_list_local); if (!snpn_id_listItem) { ogs_error("No snpn_id_listItem"); - OpenAPI_list_free(snpn_id_listList); goto end; } OpenAPI_list_add(snpn_id_listList, snpn_id_listItem); @@ -324,11 +322,19 @@ OpenAPI_sec_negotiate_req_data_t *OpenAPI_sec_negotiate_req_data_parseFromJSON(c target_plmn_id = cJSON_GetObjectItemCaseSensitive(sec_negotiate_req_dataJSON, "targetPlmnId"); if (target_plmn_id) { target_plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(target_plmn_id); + if (!target_plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [target_plmn_id]"); + goto end; + } } target_snpn_id = cJSON_GetObjectItemCaseSensitive(sec_negotiate_req_dataJSON, "targetSnpnId"); if (target_snpn_id) { target_snpn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(target_snpn_id); + if (!target_snpn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [target_snpn_id]"); + goto end; + } } intended_usage_purpose = cJSON_GetObjectItemCaseSensitive(sec_negotiate_req_dataJSON, "intendedUsagePurpose"); @@ -349,7 +355,6 @@ OpenAPI_sec_negotiate_req_data_t *OpenAPI_sec_negotiate_req_data_parseFromJSON(c OpenAPI_intended_n32_purpose_t *intended_usage_purposeItem = OpenAPI_intended_n32_purpose_parseFromJSON(intended_usage_purpose_local); if (!intended_usage_purposeItem) { ogs_error("No intended_usage_purposeItem"); - OpenAPI_list_free(intended_usage_purposeList); goto end; } OpenAPI_list_add(intended_usage_purposeList, intended_usage_purposeItem); diff --git a/lib/sbi/openapi/model/sec_negotiate_rsp_data.c b/lib/sbi/openapi/model/sec_negotiate_rsp_data.c index 0ee1a5e81..5935ac5c7 100644 --- a/lib/sbi/openapi/model/sec_negotiate_rsp_data.c +++ b/lib/sbi/openapi/model/sec_negotiate_rsp_data.c @@ -253,7 +253,6 @@ OpenAPI_sec_negotiate_rsp_data_t *OpenAPI_sec_negotiate_rsp_data_parseFromJSON(c OpenAPI_plmn_id_t *plmn_id_listItem = OpenAPI_plmn_id_parseFromJSON(plmn_id_list_local); if (!plmn_id_listItem) { ogs_error("No plmn_id_listItem"); - OpenAPI_list_free(plmn_id_listList); goto end; } OpenAPI_list_add(plmn_id_listList, plmn_id_listItem); @@ -278,7 +277,6 @@ OpenAPI_sec_negotiate_rsp_data_t *OpenAPI_sec_negotiate_rsp_data_parseFromJSON(c OpenAPI_plmn_id_nid_t *snpn_id_listItem = OpenAPI_plmn_id_nid_parseFromJSON(snpn_id_list_local); if (!snpn_id_listItem) { ogs_error("No snpn_id_listItem"); - OpenAPI_list_free(snpn_id_listList); goto end; } OpenAPI_list_add(snpn_id_listList, snpn_id_listItem); @@ -303,7 +301,6 @@ OpenAPI_sec_negotiate_rsp_data_t *OpenAPI_sec_negotiate_rsp_data_parseFromJSON(c OpenAPI_intended_n32_purpose_t *allowed_usage_purposeItem = OpenAPI_intended_n32_purpose_parseFromJSON(allowed_usage_purpose_local); if (!allowed_usage_purposeItem) { ogs_error("No allowed_usage_purposeItem"); - OpenAPI_list_free(allowed_usage_purposeList); goto end; } OpenAPI_list_add(allowed_usage_purposeList, allowed_usage_purposeItem); @@ -328,7 +325,6 @@ OpenAPI_sec_negotiate_rsp_data_t *OpenAPI_sec_negotiate_rsp_data_parseFromJSON(c OpenAPI_intended_n32_purpose_t *rejected_usage_purposeItem = OpenAPI_intended_n32_purpose_parseFromJSON(rejected_usage_purpose_local); if (!rejected_usage_purposeItem) { ogs_error("No rejected_usage_purposeItem"); - OpenAPI_list_free(rejected_usage_purposeList); goto end; } OpenAPI_list_add(rejected_usage_purposeList, rejected_usage_purposeItem); diff --git a/lib/sbi/openapi/model/sec_param_exch_req_data.c b/lib/sbi/openapi/model/sec_param_exch_req_data.c index 8c352d7d5..533f1ec70 100644 --- a/lib/sbi/openapi/model/sec_param_exch_req_data.c +++ b/lib/sbi/openapi/model/sec_param_exch_req_data.c @@ -226,6 +226,10 @@ OpenAPI_sec_param_exch_req_data_t *OpenAPI_sec_param_exch_req_data_parseFromJSON protection_policy_info = cJSON_GetObjectItemCaseSensitive(sec_param_exch_req_dataJSON, "protectionPolicyInfo"); if (protection_policy_info) { protection_policy_info_local_nonprim = OpenAPI_protection_policy_parseFromJSON(protection_policy_info); + if (!protection_policy_info_local_nonprim) { + ogs_error("OpenAPI_protection_policy_parseFromJSON failed [protection_policy_info]"); + goto end; + } } ipx_provider_sec_info_list = cJSON_GetObjectItemCaseSensitive(sec_param_exch_req_dataJSON, "ipxProviderSecInfoList"); @@ -246,7 +250,6 @@ OpenAPI_sec_param_exch_req_data_t *OpenAPI_sec_param_exch_req_data_parseFromJSON OpenAPI_ipx_provider_sec_info_t *ipx_provider_sec_info_listItem = OpenAPI_ipx_provider_sec_info_parseFromJSON(ipx_provider_sec_info_list_local); if (!ipx_provider_sec_info_listItem) { ogs_error("No ipx_provider_sec_info_listItem"); - OpenAPI_list_free(ipx_provider_sec_info_listList); goto end; } OpenAPI_list_add(ipx_provider_sec_info_listList, ipx_provider_sec_info_listItem); diff --git a/lib/sbi/openapi/model/sec_param_exch_rsp_data.c b/lib/sbi/openapi/model/sec_param_exch_rsp_data.c index 6c7d9bca7..6a9f7d7a3 100644 --- a/lib/sbi/openapi/model/sec_param_exch_rsp_data.c +++ b/lib/sbi/openapi/model/sec_param_exch_rsp_data.c @@ -178,6 +178,10 @@ OpenAPI_sec_param_exch_rsp_data_t *OpenAPI_sec_param_exch_rsp_data_parseFromJSON sel_protection_policy_info = cJSON_GetObjectItemCaseSensitive(sec_param_exch_rsp_dataJSON, "selProtectionPolicyInfo"); if (sel_protection_policy_info) { sel_protection_policy_info_local_nonprim = OpenAPI_protection_policy_parseFromJSON(sel_protection_policy_info); + if (!sel_protection_policy_info_local_nonprim) { + ogs_error("OpenAPI_protection_policy_parseFromJSON failed [sel_protection_policy_info]"); + goto end; + } } ipx_provider_sec_info_list = cJSON_GetObjectItemCaseSensitive(sec_param_exch_rsp_dataJSON, "ipxProviderSecInfoList"); @@ -198,7 +202,6 @@ OpenAPI_sec_param_exch_rsp_data_t *OpenAPI_sec_param_exch_rsp_data_parseFromJSON OpenAPI_ipx_provider_sec_info_t *ipx_provider_sec_info_listItem = OpenAPI_ipx_provider_sec_info_parseFromJSON(ipx_provider_sec_info_list_local); if (!ipx_provider_sec_info_listItem) { ogs_error("No ipx_provider_sec_info_listItem"); - OpenAPI_list_free(ipx_provider_sec_info_listList); goto end; } OpenAPI_list_add(ipx_provider_sec_info_listList, ipx_provider_sec_info_listItem); diff --git a/lib/sbi/openapi/model/secondary_rat_usage_info.c b/lib/sbi/openapi/model/secondary_rat_usage_info.c index d6937f067..c453c10aa 100644 --- a/lib/sbi/openapi/model/secondary_rat_usage_info.c +++ b/lib/sbi/openapi/model/secondary_rat_usage_info.c @@ -139,7 +139,6 @@ OpenAPI_secondary_rat_usage_info_t *OpenAPI_secondary_rat_usage_info_parseFromJS OpenAPI_qos_flow_usage_report_t *qos_flows_usage_dataItem = OpenAPI_qos_flow_usage_report_parseFromJSON(qos_flows_usage_data_local); if (!qos_flows_usage_dataItem) { ogs_error("No qos_flows_usage_dataItem"); - OpenAPI_list_free(qos_flows_usage_dataList); goto end; } OpenAPI_list_add(qos_flows_usage_dataList, qos_flows_usage_dataItem); @@ -164,7 +163,6 @@ OpenAPI_secondary_rat_usage_info_t *OpenAPI_secondary_rat_usage_info_parseFromJS OpenAPI_volume_timed_report_t *pdu_session_usage_dataItem = OpenAPI_volume_timed_report_parseFromJSON(pdu_session_usage_data_local); if (!pdu_session_usage_dataItem) { ogs_error("No pdu_session_usage_dataItem"); - OpenAPI_list_free(pdu_session_usage_dataList); goto end; } OpenAPI_list_add(pdu_session_usage_dataList, pdu_session_usage_dataItem); diff --git a/lib/sbi/openapi/model/secondary_rat_usage_report.c b/lib/sbi/openapi/model/secondary_rat_usage_report.c index 70b0fefa7..7412ab08a 100644 --- a/lib/sbi/openapi/model/secondary_rat_usage_report.c +++ b/lib/sbi/openapi/model/secondary_rat_usage_report.c @@ -117,7 +117,6 @@ OpenAPI_secondary_rat_usage_report_t *OpenAPI_secondary_rat_usage_report_parseFr OpenAPI_qos_flow_usage_report_t *qos_flows_usage_dataItem = OpenAPI_qos_flow_usage_report_parseFromJSON(qos_flows_usage_data_local); if (!qos_flows_usage_dataItem) { ogs_error("No qos_flows_usage_dataItem"); - OpenAPI_list_free(qos_flows_usage_dataList); goto end; } OpenAPI_list_add(qos_flows_usage_dataList, qos_flows_usage_dataItem); diff --git a/lib/sbi/openapi/model/send_mo_data_req_data.c b/lib/sbi/openapi/model/send_mo_data_req_data.c index 8fe315bac..a8eda1ecf 100644 --- a/lib/sbi/openapi/model/send_mo_data_req_data.c +++ b/lib/sbi/openapi/model/send_mo_data_req_data.c @@ -114,15 +114,27 @@ OpenAPI_send_mo_data_req_data_t *OpenAPI_send_mo_data_req_data_parseFromJSON(cJS goto end; } mo_data_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(mo_data); + if (!mo_data_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [mo_data]"); + goto end; + } mo_exp_data_counter = cJSON_GetObjectItemCaseSensitive(send_mo_data_req_dataJSON, "moExpDataCounter"); if (mo_exp_data_counter) { mo_exp_data_counter_local_nonprim = OpenAPI_mo_exp_data_counter_parseFromJSON(mo_exp_data_counter); + if (!mo_exp_data_counter_local_nonprim) { + ogs_error("OpenAPI_mo_exp_data_counter_parseFromJSON failed [mo_exp_data_counter]"); + goto end; + } } ue_location = cJSON_GetObjectItemCaseSensitive(send_mo_data_req_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } send_mo_data_req_data_local_var = OpenAPI_send_mo_data_req_data_create ( diff --git a/lib/sbi/openapi/model/send_mo_data_request.c b/lib/sbi/openapi/model/send_mo_data_request.c index 6b63e589a..4bfecdb60 100644 --- a/lib/sbi/openapi/model/send_mo_data_request.c +++ b/lib/sbi/openapi/model/send_mo_data_request.c @@ -84,6 +84,10 @@ OpenAPI_send_mo_data_request_t *OpenAPI_send_mo_data_request_parseFromJSON(cJSON json_data = cJSON_GetObjectItemCaseSensitive(send_mo_data_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_send_mo_data_req_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_send_mo_data_req_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_mo_data = cJSON_GetObjectItemCaseSensitive(send_mo_data_requestJSON, "binaryMoData"); diff --git a/lib/sbi/openapi/model/sepp_info.c b/lib/sbi/openapi/model/sepp_info.c index a7db3edbf..e310b8215 100644 --- a/lib/sbi/openapi/model/sepp_info.c +++ b/lib/sbi/openapi/model/sepp_info.c @@ -199,7 +199,6 @@ OpenAPI_sepp_info_t *OpenAPI_sepp_info_parseFromJSON(cJSON *sepp_infoJSON) OpenAPI_plmn_id_t *remote_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(remote_plmn_list_local); if (!remote_plmn_listItem) { ogs_error("No remote_plmn_listItem"); - OpenAPI_list_free(remote_plmn_listList); goto end; } OpenAPI_list_add(remote_plmn_listList, remote_plmn_listItem); @@ -224,7 +223,6 @@ OpenAPI_sepp_info_t *OpenAPI_sepp_info_parseFromJSON(cJSON *sepp_infoJSON) OpenAPI_plmn_id_nid_t *remote_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(remote_snpn_list_local); if (!remote_snpn_listItem) { ogs_error("No remote_snpn_listItem"); - OpenAPI_list_free(remote_snpn_listList); goto end; } OpenAPI_list_add(remote_snpn_listList, remote_snpn_listItem); diff --git a/lib/sbi/openapi/model/service_area_coverage_info.c b/lib/sbi/openapi/model/service_area_coverage_info.c index bfede8933..5e5e15673 100644 --- a/lib/sbi/openapi/model/service_area_coverage_info.c +++ b/lib/sbi/openapi/model/service_area_coverage_info.c @@ -117,6 +117,10 @@ OpenAPI_service_area_coverage_info_t *OpenAPI_service_area_coverage_info_parseFr serving_network = cJSON_GetObjectItemCaseSensitive(service_area_coverage_infoJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_1_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_1_parseFromJSON failed [serving_network]"); + goto end; + } } service_area_coverage_info_local_var = OpenAPI_service_area_coverage_info_create ( diff --git a/lib/sbi/openapi/model/service_area_id.c b/lib/sbi/openapi/model/service_area_id.c index ec84f8d33..abe71c944 100644 --- a/lib/sbi/openapi/model/service_area_id.c +++ b/lib/sbi/openapi/model/service_area_id.c @@ -104,6 +104,10 @@ OpenAPI_service_area_id_t *OpenAPI_service_area_id_parseFromJSON(cJSON *service_ goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } lac = cJSON_GetObjectItemCaseSensitive(service_area_idJSON, "lac"); if (!lac) { diff --git a/lib/sbi/openapi/model/service_area_restriction.c b/lib/sbi/openapi/model/service_area_restriction.c index 785949c00..610153829 100644 --- a/lib/sbi/openapi/model/service_area_restriction.c +++ b/lib/sbi/openapi/model/service_area_restriction.c @@ -132,7 +132,6 @@ OpenAPI_service_area_restriction_t *OpenAPI_service_area_restriction_parseFromJS OpenAPI_area_t *areasItem = OpenAPI_area_parseFromJSON(areas_local); if (!areasItem) { ogs_error("No areasItem"); - OpenAPI_list_free(areasList); goto end; } OpenAPI_list_add(areasList, areasItem); diff --git a/lib/sbi/openapi/model/service_area_restriction_1.c b/lib/sbi/openapi/model/service_area_restriction_1.c index 4e86a9a02..40e9fa29f 100644 --- a/lib/sbi/openapi/model/service_area_restriction_1.c +++ b/lib/sbi/openapi/model/service_area_restriction_1.c @@ -132,7 +132,6 @@ OpenAPI_service_area_restriction_1_t *OpenAPI_service_area_restriction_1_parseFr OpenAPI_area_1_t *areasItem = OpenAPI_area_1_parseFromJSON(areas_local); if (!areasItem) { ogs_error("No areasItem"); - OpenAPI_list_free(areasList); goto end; } OpenAPI_list_add(areasList, areasItem); diff --git a/lib/sbi/openapi/model/service_experience_info.c b/lib/sbi/openapi/model/service_experience_info.c index 1f9b627ef..06d8fd50a 100644 --- a/lib/sbi/openapi/model/service_experience_info.c +++ b/lib/sbi/openapi/model/service_experience_info.c @@ -342,6 +342,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON goto end; } svc_exprc_local_nonprim = OpenAPI_svc_experience_parseFromJSON(svc_exprc); + if (!svc_exprc_local_nonprim) { + ogs_error("OpenAPI_svc_experience_parseFromJSON failed [svc_exprc]"); + goto end; + } svc_exprc_variance = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "svcExprcVariance"); if (svc_exprc_variance) { @@ -375,6 +379,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON snssai = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } app_id = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "appId"); @@ -388,6 +396,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON srv_expc_type = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "srvExpcType"); if (srv_expc_type) { srv_expc_type_local_nonprim = OpenAPI_service_experience_type_parseFromJSON(srv_expc_type); + if (!srv_expc_type_local_nonprim) { + ogs_error("OpenAPI_service_experience_type_parseFromJSON failed [srv_expc_type]"); + goto end; + } } ue_locs = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "ueLocs"); @@ -408,7 +420,6 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON OpenAPI_location_info_t *ue_locsItem = OpenAPI_location_info_parseFromJSON(ue_locs_local); if (!ue_locsItem) { ogs_error("No ue_locsItem"); - OpenAPI_list_free(ue_locsList); goto end; } OpenAPI_list_add(ue_locsList, ue_locsItem); @@ -418,6 +429,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON upf_info = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "upfInfo"); if (upf_info) { upf_info_local_nonprim = OpenAPI_upf_information_parseFromJSON(upf_info); + if (!upf_info_local_nonprim) { + ogs_error("OpenAPI_upf_information_parseFromJSON failed [upf_info]"); + goto end; + } } dnai = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "dnai"); @@ -431,6 +446,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON app_server_inst = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "appServerInst"); if (app_server_inst) { app_server_inst_local_nonprim = OpenAPI_addr_fqdn_parseFromJSON(app_server_inst); + if (!app_server_inst_local_nonprim) { + ogs_error("OpenAPI_addr_fqdn_parseFromJSON failed [app_server_inst]"); + goto end; + } } confidence = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "confidence"); @@ -452,6 +471,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON network_area = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "networkArea"); if (network_area) { network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } } nsi_id = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "nsiId"); @@ -473,6 +496,10 @@ OpenAPI_service_experience_info_t *OpenAPI_service_experience_info_parseFromJSON rat_freq = cJSON_GetObjectItemCaseSensitive(service_experience_infoJSON, "ratFreq"); if (rat_freq) { rat_freq_local_nonprim = OpenAPI_rat_freq_information_parseFromJSON(rat_freq); + if (!rat_freq_local_nonprim) { + ogs_error("OpenAPI_rat_freq_information_parseFromJSON failed [rat_freq]"); + goto end; + } } service_experience_info_local_var = OpenAPI_service_experience_info_create ( diff --git a/lib/sbi/openapi/model/service_parameter_data.c b/lib/sbi/openapi/model/service_parameter_data.c index cfaaa1bd3..2103b024e 100644 --- a/lib/sbi/openapi/model/service_parameter_data.c +++ b/lib/sbi/openapi/model/service_parameter_data.c @@ -437,6 +437,10 @@ OpenAPI_service_parameter_data_t *OpenAPI_service_parameter_data_parseFromJSON(c snssai = cJSON_GetObjectItemCaseSensitive(service_parameter_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } inter_group_id = cJSON_GetObjectItemCaseSensitive(service_parameter_dataJSON, "interGroupId"); @@ -553,7 +557,6 @@ OpenAPI_service_parameter_data_t *OpenAPI_service_parameter_data_parseFromJSON(c OpenAPI_ursp_rule_request_t *ursp_guidanceItem = OpenAPI_ursp_rule_request_parseFromJSON(ursp_guidance_local); if (!ursp_guidanceItem) { ogs_error("No ursp_guidanceItem"); - OpenAPI_list_free(ursp_guidanceList); goto end; } OpenAPI_list_add(ursp_guidanceList, ursp_guidanceItem); @@ -578,7 +581,6 @@ OpenAPI_service_parameter_data_t *OpenAPI_service_parameter_data_parseFromJSON(c OpenAPI_event_t *delivery_eventsItem = OpenAPI_event_parseFromJSON(delivery_events_local); if (!delivery_eventsItem) { ogs_error("No delivery_eventsItem"); - OpenAPI_list_free(delivery_eventsList); goto end; } OpenAPI_list_add(delivery_eventsList, delivery_eventsItem); diff --git a/lib/sbi/openapi/model/service_parameter_data_patch.c b/lib/sbi/openapi/model/service_parameter_data_patch.c index d1790b001..03562742c 100644 --- a/lib/sbi/openapi/model/service_parameter_data_patch.c +++ b/lib/sbi/openapi/model/service_parameter_data_patch.c @@ -261,7 +261,6 @@ OpenAPI_service_parameter_data_patch_t *OpenAPI_service_parameter_data_patch_par OpenAPI_ursp_rule_request_t *ursp_influenceItem = OpenAPI_ursp_rule_request_parseFromJSON(ursp_influence_local); if (!ursp_influenceItem) { ogs_error("No ursp_influenceItem"); - OpenAPI_list_free(ursp_influenceList); goto end; } OpenAPI_list_add(ursp_influenceList, ursp_influenceItem); @@ -286,7 +285,6 @@ OpenAPI_service_parameter_data_patch_t *OpenAPI_service_parameter_data_patch_par OpenAPI_event_t *delivery_eventsItem = OpenAPI_event_parseFromJSON(delivery_events_local); if (!delivery_eventsItem) { ogs_error("No delivery_eventsItem"); - OpenAPI_list_free(delivery_eventsList); goto end; } OpenAPI_list_add(delivery_eventsList, delivery_eventsItem); diff --git a/lib/sbi/openapi/model/service_specific_authorization_info.c b/lib/sbi/openapi/model/service_specific_authorization_info.c index b5d6ee77d..64f19e01d 100644 --- a/lib/sbi/openapi/model/service_specific_authorization_info.c +++ b/lib/sbi/openapi/model/service_specific_authorization_info.c @@ -93,7 +93,6 @@ OpenAPI_service_specific_authorization_info_t *OpenAPI_service_specific_authoriz OpenAPI_authorization_info_t *service_specific_authorization_listItem = OpenAPI_authorization_info_parseFromJSON(service_specific_authorization_list_local); if (!service_specific_authorization_listItem) { ogs_error("No service_specific_authorization_listItem"); - OpenAPI_list_free(service_specific_authorization_listList); goto end; } OpenAPI_list_add(service_specific_authorization_listList, service_specific_authorization_listItem); diff --git a/lib/sbi/openapi/model/service_type_unrelated_class.c b/lib/sbi/openapi/model/service_type_unrelated_class.c index ae946aa09..cfcc6f5f5 100644 --- a/lib/sbi/openapi/model/service_type_unrelated_class.c +++ b/lib/sbi/openapi/model/service_type_unrelated_class.c @@ -174,7 +174,6 @@ OpenAPI_service_type_unrelated_class_t *OpenAPI_service_type_unrelated_class_par OpenAPI_geographic_area_t *allowed_geographic_areaItem = OpenAPI_geographic_area_parseFromJSON(allowed_geographic_area_local); if (!allowed_geographic_areaItem) { ogs_error("No allowed_geographic_areaItem"); - OpenAPI_list_free(allowed_geographic_areaList); goto end; } OpenAPI_list_add(allowed_geographic_areaList, allowed_geographic_areaItem); @@ -202,6 +201,10 @@ OpenAPI_service_type_unrelated_class_t *OpenAPI_service_type_unrelated_class_par valid_time_period = cJSON_GetObjectItemCaseSensitive(service_type_unrelated_classJSON, "validTimePeriod"); if (valid_time_period) { valid_time_period_local_nonprim = OpenAPI_valid_time_period_parseFromJSON(valid_time_period); + if (!valid_time_period_local_nonprim) { + ogs_error("OpenAPI_valid_time_period_parseFromJSON failed [valid_time_period]"); + goto end; + } } code_word_list = cJSON_GetObjectItemCaseSensitive(service_type_unrelated_classJSON, "codeWordList"); diff --git a/lib/sbi/openapi/model/serving_nf_identity.c b/lib/sbi/openapi/model/serving_nf_identity.c index d98cf2a63..100c25182 100644 --- a/lib/sbi/openapi/model/serving_nf_identity.c +++ b/lib/sbi/openapi/model/serving_nf_identity.c @@ -131,16 +131,28 @@ OpenAPI_serving_nf_identity_t *OpenAPI_serving_nf_identity_parseFromJSON(cJSON * guami = cJSON_GetObjectItemCaseSensitive(serving_nf_identityJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } an_gw_addr = cJSON_GetObjectItemCaseSensitive(serving_nf_identityJSON, "anGwAddr"); if (an_gw_addr) { an_gw_addr_local_nonprim = OpenAPI_an_gw_address_parseFromJSON(an_gw_addr); + if (!an_gw_addr_local_nonprim) { + ogs_error("OpenAPI_an_gw_address_parseFromJSON failed [an_gw_addr]"); + goto end; + } } sgsn_addr = cJSON_GetObjectItemCaseSensitive(serving_nf_identityJSON, "sgsnAddr"); if (sgsn_addr) { sgsn_addr_local_nonprim = OpenAPI_sgsn_address_parseFromJSON(sgsn_addr); + if (!sgsn_addr_local_nonprim) { + ogs_error("OpenAPI_sgsn_address_parseFromJSON failed [sgsn_addr]"); + goto end; + } } serving_nf_identity_local_var = OpenAPI_serving_nf_identity_create ( diff --git a/lib/sbi/openapi/model/session_management_subscription_data.c b/lib/sbi/openapi/model/session_management_subscription_data.c index b6467ac0c..e9753bcfa 100644 --- a/lib/sbi/openapi/model/session_management_subscription_data.c +++ b/lib/sbi/openapi/model/session_management_subscription_data.c @@ -325,6 +325,10 @@ OpenAPI_session_management_subscription_data_t *OpenAPI_session_management_subsc goto end; } single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } dnn_configurations = cJSON_GetObjectItemCaseSensitive(session_management_subscription_dataJSON, "dnnConfigurations"); if (dnn_configurations) { @@ -417,6 +421,10 @@ OpenAPI_session_management_subscription_data_t *OpenAPI_session_management_subsc trace_data = cJSON_GetObjectItemCaseSensitive(session_management_subscription_dataJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } shared_trace_data_id = cJSON_GetObjectItemCaseSensitive(session_management_subscription_dataJSON, "sharedTraceDataId"); diff --git a/lib/sbi/openapi/model/session_management_subscription_data_1.c b/lib/sbi/openapi/model/session_management_subscription_data_1.c index 29f4b03f0..8060c3f05 100644 --- a/lib/sbi/openapi/model/session_management_subscription_data_1.c +++ b/lib/sbi/openapi/model/session_management_subscription_data_1.c @@ -325,6 +325,10 @@ OpenAPI_session_management_subscription_data_1_t *OpenAPI_session_management_sub goto end; } single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } dnn_configurations = cJSON_GetObjectItemCaseSensitive(session_management_subscription_data_1JSON, "dnnConfigurations"); if (dnn_configurations) { @@ -417,6 +421,10 @@ OpenAPI_session_management_subscription_data_1_t *OpenAPI_session_management_sub trace_data = cJSON_GetObjectItemCaseSensitive(session_management_subscription_data_1JSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } shared_trace_data_id = cJSON_GetObjectItemCaseSensitive(session_management_subscription_data_1JSON, "sharedTraceDataId"); diff --git a/lib/sbi/openapi/model/session_rule.c b/lib/sbi/openapi/model/session_rule.c index 60eb658b9..7d37ce1b3 100644 --- a/lib/sbi/openapi/model/session_rule.c +++ b/lib/sbi/openapi/model/session_rule.c @@ -146,11 +146,19 @@ OpenAPI_session_rule_t *OpenAPI_session_rule_parseFromJSON(cJSON *session_ruleJS auth_sess_ambr = cJSON_GetObjectItemCaseSensitive(session_ruleJSON, "authSessAmbr"); if (auth_sess_ambr) { auth_sess_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(auth_sess_ambr); + if (!auth_sess_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [auth_sess_ambr]"); + goto end; + } } auth_def_qos = cJSON_GetObjectItemCaseSensitive(session_ruleJSON, "authDefQos"); if (auth_def_qos) { auth_def_qos_local_nonprim = OpenAPI_authorized_default_qos_parseFromJSON(auth_def_qos); + if (!auth_def_qos_local_nonprim) { + ogs_error("OpenAPI_authorized_default_qos_parseFromJSON failed [auth_def_qos]"); + goto end; + } } sess_rule_id = cJSON_GetObjectItemCaseSensitive(session_ruleJSON, "sessRuleId"); diff --git a/lib/sbi/openapi/model/shared_data.c b/lib/sbi/openapi/model/shared_data.c index 39835dd7e..f1946ccc6 100644 --- a/lib/sbi/openapi/model/shared_data.c +++ b/lib/sbi/openapi/model/shared_data.c @@ -337,16 +337,28 @@ OpenAPI_shared_data_t *OpenAPI_shared_data_parseFromJSON(cJSON *shared_dataJSON) shared_am_data = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedAmData"); if (shared_am_data) { shared_am_data_local_nonprim = OpenAPI_access_and_mobility_subscription_data_parseFromJSON(shared_am_data); + if (!shared_am_data_local_nonprim) { + ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON failed [shared_am_data]"); + goto end; + } } shared_sms_subs_data = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedSmsSubsData"); if (shared_sms_subs_data) { shared_sms_subs_data_local_nonprim = OpenAPI_sms_subscription_data_parseFromJSON(shared_sms_subs_data); + if (!shared_sms_subs_data_local_nonprim) { + ogs_error("OpenAPI_sms_subscription_data_parseFromJSON failed [shared_sms_subs_data]"); + goto end; + } } shared_sms_mng_subs_data = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedSmsMngSubsData"); if (shared_sms_mng_subs_data) { shared_sms_mng_subs_data_local_nonprim = OpenAPI_sms_management_subscription_data_parseFromJSON(shared_sms_mng_subs_data); + if (!shared_sms_mng_subs_data_local_nonprim) { + ogs_error("OpenAPI_sms_management_subscription_data_parseFromJSON failed [shared_sms_mng_subs_data]"); + goto end; + } } shared_dnn_configurations = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedDnnConfigurations"); @@ -378,6 +390,10 @@ OpenAPI_shared_data_t *OpenAPI_shared_data_parseFromJSON(cJSON *shared_dataJSON) shared_trace_data = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedTraceData"); if (shared_trace_data) { shared_trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(shared_trace_data); + if (!shared_trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [shared_trace_data]"); + goto end; + } } shared_snssai_infos = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedSnssaiInfos"); @@ -457,11 +473,19 @@ OpenAPI_shared_data_t *OpenAPI_shared_data_parseFromJSON(cJSON *shared_dataJSON) shared_sm_subs_data = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedSmSubsData"); if (shared_sm_subs_data) { shared_sm_subs_data_local_nonprim = OpenAPI_session_management_subscription_data_parseFromJSON(shared_sm_subs_data); + if (!shared_sm_subs_data_local_nonprim) { + ogs_error("OpenAPI_session_management_subscription_data_parseFromJSON failed [shared_sm_subs_data]"); + goto end; + } } shared_ecs_addr_config_info = cJSON_GetObjectItemCaseSensitive(shared_dataJSON, "sharedEcsAddrConfigInfo"); if (shared_ecs_addr_config_info) { shared_ecs_addr_config_info_local_nonprim = OpenAPI_ecs_addr_config_info_parseFromJSON(shared_ecs_addr_config_info); + if (!shared_ecs_addr_config_info_local_nonprim) { + ogs_error("OpenAPI_ecs_addr_config_info_parseFromJSON failed [shared_ecs_addr_config_info]"); + goto end; + } } shared_data_local_var = OpenAPI_shared_data_create ( diff --git a/lib/sbi/openapi/model/slice_info_for_pdu_session.c b/lib/sbi/openapi/model/slice_info_for_pdu_session.c index 267ced171..b1a3c1e96 100644 --- a/lib/sbi/openapi/model/slice_info_for_pdu_session.c +++ b/lib/sbi/openapi/model/slice_info_for_pdu_session.c @@ -106,6 +106,10 @@ OpenAPI_slice_info_for_pdu_session_t *OpenAPI_slice_info_for_pdu_session_parseFr goto end; } s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } roaming_indication = cJSON_GetObjectItemCaseSensitive(slice_info_for_pdu_sessionJSON, "roamingIndication"); if (!roaming_indication) { @@ -121,6 +125,10 @@ OpenAPI_slice_info_for_pdu_session_t *OpenAPI_slice_info_for_pdu_session_parseFr home_snssai = cJSON_GetObjectItemCaseSensitive(slice_info_for_pdu_sessionJSON, "homeSnssai"); if (home_snssai) { home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(home_snssai); + if (!home_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [home_snssai]"); + goto end; + } } slice_info_for_pdu_session_local_var = OpenAPI_slice_info_for_pdu_session_create ( diff --git a/lib/sbi/openapi/model/slice_info_for_registration.c b/lib/sbi/openapi/model/slice_info_for_registration.c index 16be87504..775d55299 100644 --- a/lib/sbi/openapi/model/slice_info_for_registration.c +++ b/lib/sbi/openapi/model/slice_info_for_registration.c @@ -271,7 +271,6 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse OpenAPI_subscribed_snssai_t *subscribed_nssaiItem = OpenAPI_subscribed_snssai_parseFromJSON(subscribed_nssai_local); if (!subscribed_nssaiItem) { ogs_error("No subscribed_nssaiItem"); - OpenAPI_list_free(subscribed_nssaiList); goto end; } OpenAPI_list_add(subscribed_nssaiList, subscribed_nssaiItem); @@ -281,11 +280,19 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse allowed_nssai_current_access = cJSON_GetObjectItemCaseSensitive(slice_info_for_registrationJSON, "allowedNssaiCurrentAccess"); if (allowed_nssai_current_access) { allowed_nssai_current_access_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_current_access); + if (!allowed_nssai_current_access_local_nonprim) { + ogs_error("OpenAPI_allowed_nssai_parseFromJSON failed [allowed_nssai_current_access]"); + goto end; + } } allowed_nssai_other_access = cJSON_GetObjectItemCaseSensitive(slice_info_for_registrationJSON, "allowedNssaiOtherAccess"); if (allowed_nssai_other_access) { allowed_nssai_other_access_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_other_access); + if (!allowed_nssai_other_access_local_nonprim) { + ogs_error("OpenAPI_allowed_nssai_parseFromJSON failed [allowed_nssai_other_access]"); + goto end; + } } s_nssai_for_mapping = cJSON_GetObjectItemCaseSensitive(slice_info_for_registrationJSON, "sNssaiForMapping"); @@ -306,7 +313,6 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse OpenAPI_snssai_t *s_nssai_for_mappingItem = OpenAPI_snssai_parseFromJSON(s_nssai_for_mapping_local); if (!s_nssai_for_mappingItem) { ogs_error("No s_nssai_for_mappingItem"); - OpenAPI_list_free(s_nssai_for_mappingList); goto end; } OpenAPI_list_add(s_nssai_for_mappingList, s_nssai_for_mappingItem); @@ -331,7 +337,6 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse OpenAPI_snssai_t *requested_nssaiItem = OpenAPI_snssai_parseFromJSON(requested_nssai_local); if (!requested_nssaiItem) { ogs_error("No requested_nssaiItem"); - OpenAPI_list_free(requested_nssaiList); goto end; } OpenAPI_list_add(requested_nssaiList, requested_nssaiItem); @@ -364,7 +369,6 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse OpenAPI_mapping_of_snssai_t *mapping_of_nssaiItem = OpenAPI_mapping_of_snssai_parseFromJSON(mapping_of_nssai_local); if (!mapping_of_nssaiItem) { ogs_error("No mapping_of_nssaiItem"); - OpenAPI_list_free(mapping_of_nssaiList); goto end; } OpenAPI_list_add(mapping_of_nssaiList, mapping_of_nssaiItem); diff --git a/lib/sbi/openapi/model/slice_info_for_ue_configuration_update.c b/lib/sbi/openapi/model/slice_info_for_ue_configuration_update.c index a61b8ea31..885bff8fd 100644 --- a/lib/sbi/openapi/model/slice_info_for_ue_configuration_update.c +++ b/lib/sbi/openapi/model/slice_info_for_ue_configuration_update.c @@ -259,7 +259,6 @@ OpenAPI_slice_info_for_ue_configuration_update_t *OpenAPI_slice_info_for_ue_conf OpenAPI_subscribed_snssai_t *subscribed_nssaiItem = OpenAPI_subscribed_snssai_parseFromJSON(subscribed_nssai_local); if (!subscribed_nssaiItem) { ogs_error("No subscribed_nssaiItem"); - OpenAPI_list_free(subscribed_nssaiList); goto end; } OpenAPI_list_add(subscribed_nssaiList, subscribed_nssaiItem); @@ -269,11 +268,19 @@ OpenAPI_slice_info_for_ue_configuration_update_t *OpenAPI_slice_info_for_ue_conf allowed_nssai_current_access = cJSON_GetObjectItemCaseSensitive(slice_info_for_ue_configuration_updateJSON, "allowedNssaiCurrentAccess"); if (allowed_nssai_current_access) { allowed_nssai_current_access_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_current_access); + if (!allowed_nssai_current_access_local_nonprim) { + ogs_error("OpenAPI_allowed_nssai_parseFromJSON failed [allowed_nssai_current_access]"); + goto end; + } } allowed_nssai_other_access = cJSON_GetObjectItemCaseSensitive(slice_info_for_ue_configuration_updateJSON, "allowedNssaiOtherAccess"); if (allowed_nssai_other_access) { allowed_nssai_other_access_local_nonprim = OpenAPI_allowed_nssai_parseFromJSON(allowed_nssai_other_access); + if (!allowed_nssai_other_access_local_nonprim) { + ogs_error("OpenAPI_allowed_nssai_parseFromJSON failed [allowed_nssai_other_access]"); + goto end; + } } default_configured_snssai_ind = cJSON_GetObjectItemCaseSensitive(slice_info_for_ue_configuration_updateJSON, "defaultConfiguredSnssaiInd"); @@ -302,7 +309,6 @@ OpenAPI_slice_info_for_ue_configuration_update_t *OpenAPI_slice_info_for_ue_conf OpenAPI_snssai_t *requested_nssaiItem = OpenAPI_snssai_parseFromJSON(requested_nssai_local); if (!requested_nssaiItem) { ogs_error("No requested_nssaiItem"); - OpenAPI_list_free(requested_nssaiList); goto end; } OpenAPI_list_add(requested_nssaiList, requested_nssaiItem); @@ -327,7 +333,6 @@ OpenAPI_slice_info_for_ue_configuration_update_t *OpenAPI_slice_info_for_ue_conf OpenAPI_mapping_of_snssai_t *mapping_of_nssaiItem = OpenAPI_mapping_of_snssai_parseFromJSON(mapping_of_nssai_local); if (!mapping_of_nssaiItem) { ogs_error("No mapping_of_nssaiItem"); - OpenAPI_list_free(mapping_of_nssaiList); goto end; } OpenAPI_list_add(mapping_of_nssaiList, mapping_of_nssaiItem); @@ -368,7 +373,6 @@ OpenAPI_slice_info_for_ue_configuration_update_t *OpenAPI_slice_info_for_ue_conf OpenAPI_snssai_t *rejected_nssai_raItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_ra_local); if (!rejected_nssai_raItem) { ogs_error("No rejected_nssai_raItem"); - OpenAPI_list_free(rejected_nssai_raList); goto end; } OpenAPI_list_add(rejected_nssai_raList, rejected_nssai_raItem); diff --git a/lib/sbi/openapi/model/slice_load_level_information.c b/lib/sbi/openapi/model/slice_load_level_information.c index 16ae896a2..250519116 100644 --- a/lib/sbi/openapi/model/slice_load_level_information.c +++ b/lib/sbi/openapi/model/slice_load_level_information.c @@ -111,7 +111,6 @@ OpenAPI_slice_load_level_information_t *OpenAPI_slice_load_level_information_par OpenAPI_snssai_t *snssaisItem = OpenAPI_snssai_parseFromJSON(snssais_local); if (!snssaisItem) { ogs_error("No snssaisItem"); - OpenAPI_list_free(snssaisList); goto end; } OpenAPI_list_add(snssaisList, snssaisItem); diff --git a/lib/sbi/openapi/model/sm_context.c b/lib/sbi/openapi/model/sm_context.c index 32af41773..99003aee4 100644 --- a/lib/sbi/openapi/model/sm_context.c +++ b/lib/sbi/openapi/model/sm_context.c @@ -1003,10 +1003,18 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) goto end; } s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } hplmn_snssai = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "hplmnSnssai"); if (hplmn_snssai) { hplmn_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(hplmn_snssai); + if (!hplmn_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [hplmn_snssai]"); + goto end; + } } pdu_session_type = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "pduSessionType"); @@ -1131,6 +1139,10 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) goto end; } session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } qos_flows_list = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "qosFlowsList"); if (!qos_flows_list) { @@ -1153,7 +1165,6 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) OpenAPI_qos_flow_setup_item_t *qos_flows_listItem = OpenAPI_qos_flow_setup_item_parseFromJSON(qos_flows_list_local); if (!qos_flows_listItem) { ogs_error("No qos_flows_listItem"); - OpenAPI_list_free(qos_flows_listList); goto end; } OpenAPI_list_add(qos_flows_listList, qos_flows_listItem); @@ -1227,6 +1238,10 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) eps_pdn_cnx_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "epsPdnCnxInfo"); if (eps_pdn_cnx_info) { eps_pdn_cnx_info_local_nonprim = OpenAPI_eps_pdn_cnx_info_parseFromJSON(eps_pdn_cnx_info); + if (!eps_pdn_cnx_info_local_nonprim) { + ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON failed [eps_pdn_cnx_info]"); + goto end; + } } eps_bearer_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "epsBearerInfo"); @@ -1247,7 +1262,6 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) OpenAPI_eps_bearer_info_t *eps_bearer_infoItem = OpenAPI_eps_bearer_info_parseFromJSON(eps_bearer_info_local); if (!eps_bearer_infoItem) { ogs_error("No eps_bearer_infoItem"); - OpenAPI_list_free(eps_bearer_infoList); goto end; } OpenAPI_list_add(eps_bearer_infoList, eps_bearer_infoItem); @@ -1283,6 +1297,10 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) up_security = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "upSecurity"); if (up_security) { up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_parseFromJSON failed [up_security]"); + goto end; + } } h_smf_service_instance_id = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "hSmfServiceInstanceId"); @@ -1320,6 +1338,10 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) psa_tunnel_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "psaTunnelInfo"); if (psa_tunnel_info) { psa_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(psa_tunnel_info); + if (!psa_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [psa_tunnel_info]"); + goto end; + } } charging_id = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "chargingId"); @@ -1333,11 +1355,19 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) charging_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "chargingInfo"); if (charging_info) { charging_info_local_nonprim = OpenAPI_charging_information_parseFromJSON(charging_info); + if (!charging_info_local_nonprim) { + ogs_error("OpenAPI_charging_information_parseFromJSON failed [charging_info]"); + goto end; + } } roaming_charging_profile = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "roamingChargingProfile"); if (roaming_charging_profile) { roaming_charging_profile_local_nonprim = OpenAPI_roaming_charging_profile_parseFromJSON(roaming_charging_profile); + if (!roaming_charging_profile_local_nonprim) { + ogs_error("OpenAPI_roaming_charging_profile_parseFromJSON failed [roaming_charging_profile]"); + goto end; + } } nef_ext_buf_support_ind = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "nefExtBufSupportInd"); @@ -1359,16 +1389,28 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) dn_aaa_address = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "dnAaaAddress"); if (dn_aaa_address) { dn_aaa_address_local_nonprim = OpenAPI_ip_address_parseFromJSON(dn_aaa_address); + if (!dn_aaa_address_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [dn_aaa_address]"); + goto end; + } } redundant_pdu_session_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "redundantPduSessionInfo"); if (redundant_pdu_session_info) { redundant_pdu_session_info_local_nonprim = OpenAPI_redundant_pdu_session_information_parseFromJSON(redundant_pdu_session_info); + if (!redundant_pdu_session_info_local_nonprim) { + ogs_error("OpenAPI_redundant_pdu_session_information_parseFromJSON failed [redundant_pdu_session_info]"); + goto end; + } } ran_tunnel_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "ranTunnelInfo"); if (ran_tunnel_info) { ran_tunnel_info_local_nonprim = OpenAPI_qos_flow_tunnel_parseFromJSON(ran_tunnel_info); + if (!ran_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_qos_flow_tunnel_parseFromJSON failed [ran_tunnel_info]"); + goto end; + } } add_ran_tunnel_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "addRanTunnelInfo"); @@ -1389,7 +1431,6 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) OpenAPI_qos_flow_tunnel_t *add_ran_tunnel_infoItem = OpenAPI_qos_flow_tunnel_parseFromJSON(add_ran_tunnel_info_local); if (!add_ran_tunnel_infoItem) { ogs_error("No add_ran_tunnel_infoItem"); - OpenAPI_list_free(add_ran_tunnel_infoList); goto end; } OpenAPI_list_add(add_ran_tunnel_infoList, add_ran_tunnel_infoItem); @@ -1399,6 +1440,10 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) red_ran_tunnel_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "redRanTunnelInfo"); if (red_ran_tunnel_info) { red_ran_tunnel_info_local_nonprim = OpenAPI_qos_flow_tunnel_parseFromJSON(red_ran_tunnel_info); + if (!red_ran_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_qos_flow_tunnel_parseFromJSON failed [red_ran_tunnel_info]"); + goto end; + } } add_red_ran_tunnel_info = cJSON_GetObjectItemCaseSensitive(sm_contextJSON, "addRedRanTunnelInfo"); @@ -1419,7 +1464,6 @@ OpenAPI_sm_context_t *OpenAPI_sm_context_parseFromJSON(cJSON *sm_contextJSON) OpenAPI_qos_flow_tunnel_t *add_red_ran_tunnel_infoItem = OpenAPI_qos_flow_tunnel_parseFromJSON(add_red_ran_tunnel_info_local); if (!add_red_ran_tunnel_infoItem) { ogs_error("No add_red_ran_tunnel_infoItem"); - OpenAPI_list_free(add_red_ran_tunnel_infoList); goto end; } OpenAPI_list_add(add_red_ran_tunnel_infoList, add_red_ran_tunnel_infoItem); diff --git a/lib/sbi/openapi/model/sm_context_create_data.c b/lib/sbi/openapi/model/sm_context_create_data.c index cb67a394f..19ecbffb1 100644 --- a/lib/sbi/openapi/model/sm_context_create_data.c +++ b/lib/sbi/openapi/model/sm_context_create_data.c @@ -1615,11 +1615,19 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c s_nssai = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } hplmn_snssai = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "hplmnSnssai"); if (hplmn_snssai) { hplmn_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(hplmn_snssai); + if (!hplmn_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [hplmn_snssai]"); + goto end; + } } serving_nf_id = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "servingNfId"); @@ -1635,6 +1643,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c guami = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } service_name = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "serviceName"); @@ -1651,6 +1663,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c goto end; } serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } request_type = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "requestType"); if (request_type) { @@ -1664,6 +1680,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c n1_sm_msg = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "n1SmMsg"); if (n1_sm_msg) { n1_sm_msg_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_msg); + if (!n1_sm_msg_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_msg]"); + goto end; + } } an_type = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "anType"); @@ -1707,6 +1727,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "ueTimeZone"); @@ -1720,6 +1744,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c add_ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } sm_context_status_uri = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "smContextStatusUri"); @@ -1967,7 +1995,6 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); @@ -1977,6 +2004,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c trace_data = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } udm_group_id = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "udmGroupId"); @@ -2031,6 +2062,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c target_id = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "targetId"); if (target_id) { target_id_local_nonprim = OpenAPI_ng_ran_target_id_parseFromJSON(target_id); + if (!target_id_local_nonprim) { + ogs_error("OpenAPI_ng_ran_target_id_parseFromJSON failed [target_id]"); + goto end; + } } eps_bearer_ctx_status = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "epsBearerCtxStatus"); @@ -2084,6 +2119,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "n2SmInfoType"); @@ -2098,6 +2137,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c n2_sm_info_ext1 = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "n2SmInfoExt1"); if (n2_sm_info_ext1) { n2_sm_info_ext1_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info_ext1); + if (!n2_sm_info_ext1_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info_ext1]"); + goto end; + } } n2_sm_info_type_ext1 = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "n2SmInfoTypeExt1"); @@ -2120,6 +2163,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c sm_context_smf_plmn_id = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "smContextSmfPlmnId"); if (sm_context_smf_plmn_id) { sm_context_smf_plmn_id_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(sm_context_smf_plmn_id); + if (!sm_context_smf_plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [sm_context_smf_plmn_id]"); + goto end; + } } sm_context_smf_id = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "smContextSmfId"); @@ -2167,11 +2214,19 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c small_data_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } extended_nas_sm_timer_ind = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "extendedNasSmTimerInd"); @@ -2193,6 +2248,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c ddn_failure_subs = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "ddnFailureSubs"); if (ddn_failure_subs) { ddn_failure_subs_local_nonprim = OpenAPI_ddn_failure_subs_parseFromJSON(ddn_failure_subs); + if (!ddn_failure_subs_local_nonprim) { + ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON failed [ddn_failure_subs]"); + goto end; + } } smf_transfer_ind = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "smfTransferInd"); @@ -2222,16 +2281,28 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c w_agf_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "wAgfInfo"); if (w_agf_info) { w_agf_info_local_nonprim = OpenAPI_w_agf_info_parseFromJSON(w_agf_info); + if (!w_agf_info_local_nonprim) { + ogs_error("OpenAPI_w_agf_info_parseFromJSON failed [w_agf_info]"); + goto end; + } } tngf_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "tngfInfo"); if (tngf_info) { tngf_info_local_nonprim = OpenAPI_tngf_info_parseFromJSON(tngf_info); + if (!tngf_info_local_nonprim) { + ogs_error("OpenAPI_tngf_info_parseFromJSON failed [tngf_info]"); + goto end; + } } twif_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "twifInfo"); if (twif_info) { twif_info_local_nonprim = OpenAPI_twif_info_parseFromJSON(twif_info); + if (!twif_info_local_nonprim) { + ogs_error("OpenAPI_twif_info_parseFromJSON failed [twif_info]"); + goto end; + } } ran_unchanged_ind = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "ranUnchangedInd"); @@ -2338,7 +2409,6 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local); if (!pvs_infoItem) { ogs_error("No pvs_infoItem"); - OpenAPI_list_free(pvs_infoList); goto end; } OpenAPI_list_add(pvs_infoList, pvs_infoItem); @@ -2372,6 +2442,10 @@ OpenAPI_sm_context_create_data_t *OpenAPI_sm_context_create_data_parseFromJSON(c pcf_ue_callback_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "pcfUeCallbackInfo"); if (pcf_ue_callback_info) { pcf_ue_callback_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_callback_info); + if (!pcf_ue_callback_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_callback_info]"); + goto end; + } } satellite_backhaul_cat = cJSON_GetObjectItemCaseSensitive(sm_context_create_dataJSON, "satelliteBackhaulCat"); diff --git a/lib/sbi/openapi/model/sm_context_create_error.c b/lib/sbi/openapi/model/sm_context_create_error.c index ceeaaa359..4e37f2515 100644 --- a/lib/sbi/openapi/model/sm_context_create_error.c +++ b/lib/sbi/openapi/model/sm_context_create_error.c @@ -139,15 +139,27 @@ OpenAPI_sm_context_create_error_t *OpenAPI_sm_context_create_error_parseFromJSON goto end; } error_local_nonprim = OpenAPI_ext_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_ext_problem_details_parseFromJSON failed [error]"); + goto end; + } n1_sm_msg = cJSON_GetObjectItemCaseSensitive(sm_context_create_errorJSON, "n1SmMsg"); if (n1_sm_msg) { n1_sm_msg_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_msg); + if (!n1_sm_msg_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_msg]"); + goto end; + } } n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_create_errorJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_create_errorJSON, "n2SmInfoType"); diff --git a/lib/sbi/openapi/model/sm_context_created_data.c b/lib/sbi/openapi/model/sm_context_created_data.c index eb5635fbb..09bc0ace8 100644 --- a/lib/sbi/openapi/model/sm_context_created_data.c +++ b/lib/sbi/openapi/model/sm_context_created_data.c @@ -310,6 +310,10 @@ OpenAPI_sm_context_created_data_t *OpenAPI_sm_context_created_data_parseFromJSON s_nssai = cJSON_GetObjectItemCaseSensitive(sm_context_created_dataJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } up_cnx_state = cJSON_GetObjectItemCaseSensitive(sm_context_created_dataJSON, "upCnxState"); @@ -324,6 +328,10 @@ OpenAPI_sm_context_created_data_t *OpenAPI_sm_context_created_data_parseFromJSON n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_created_dataJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_created_dataJSON, "n2SmInfoType"); @@ -353,7 +361,6 @@ OpenAPI_sm_context_created_data_t *OpenAPI_sm_context_created_data_parseFromJSON OpenAPI_ebi_arp_mapping_t *allocated_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(allocated_ebi_list_local); if (!allocated_ebi_listItem) { ogs_error("No allocated_ebi_listItem"); - OpenAPI_list_free(allocated_ebi_listList); goto end; } OpenAPI_list_add(allocated_ebi_listList, allocated_ebi_listItem); diff --git a/lib/sbi/openapi/model/sm_context_release_data.c b/lib/sbi/openapi/model/sm_context_release_data.c index 5e7cead54..b84a85036 100644 --- a/lib/sbi/openapi/model/sm_context_release_data.c +++ b/lib/sbi/openapi/model/sm_context_release_data.c @@ -211,6 +211,10 @@ OpenAPI_sm_context_release_data_t *OpenAPI_sm_context_release_data_parseFromJSON ng_ap_cause = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause_value = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "5gMmCauseValue"); @@ -224,6 +228,10 @@ OpenAPI_sm_context_release_data_t *OpenAPI_sm_context_release_data_parseFromJSON ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "ueTimeZone"); @@ -237,6 +245,10 @@ OpenAPI_sm_context_release_data_t *OpenAPI_sm_context_release_data_parseFromJSON add_ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } vsmf_release_only = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "vsmfReleaseOnly"); @@ -250,6 +262,10 @@ OpenAPI_sm_context_release_data_t *OpenAPI_sm_context_release_data_parseFromJSON n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_release_dataJSON, "n2SmInfoType"); diff --git a/lib/sbi/openapi/model/sm_context_released_data.c b/lib/sbi/openapi/model/sm_context_released_data.c index 3afdc8afb..56caf9628 100644 --- a/lib/sbi/openapi/model/sm_context_released_data.c +++ b/lib/sbi/openapi/model/sm_context_released_data.c @@ -88,11 +88,19 @@ OpenAPI_sm_context_released_data_t *OpenAPI_sm_context_released_data_parseFromJS small_data_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_released_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_released_dataJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } sm_context_released_data_local_var = OpenAPI_sm_context_released_data_create ( diff --git a/lib/sbi/openapi/model/sm_context_retrieve_data.c b/lib/sbi/openapi/model/sm_context_retrieve_data.c index 24e384735..5a0204bd7 100644 --- a/lib/sbi/openapi/model/sm_context_retrieve_data.c +++ b/lib/sbi/openapi/model/sm_context_retrieve_data.c @@ -136,6 +136,10 @@ OpenAPI_sm_context_retrieve_data_t *OpenAPI_sm_context_retrieve_data_parseFromJS target_mme_cap = cJSON_GetObjectItemCaseSensitive(sm_context_retrieve_dataJSON, "targetMmeCap"); if (target_mme_cap) { target_mme_cap_local_nonprim = OpenAPI_mme_capabilities_parseFromJSON(target_mme_cap); + if (!target_mme_cap_local_nonprim) { + ogs_error("OpenAPI_mme_capabilities_parseFromJSON failed [target_mme_cap]"); + goto end; + } } sm_context_type = cJSON_GetObjectItemCaseSensitive(sm_context_retrieve_dataJSON, "smContextType"); @@ -150,6 +154,10 @@ OpenAPI_sm_context_retrieve_data_t *OpenAPI_sm_context_retrieve_data_parseFromJS serving_network = cJSON_GetObjectItemCaseSensitive(sm_context_retrieve_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [serving_network]"); + goto end; + } } not_to_transfer_ebi_list = cJSON_GetObjectItemCaseSensitive(sm_context_retrieve_dataJSON, "notToTransferEbiList"); diff --git a/lib/sbi/openapi/model/sm_context_retrieved_data.c b/lib/sbi/openapi/model/sm_context_retrieved_data.c index 3e5e588b0..8cff37c21 100644 --- a/lib/sbi/openapi/model/sm_context_retrieved_data.c +++ b/lib/sbi/openapi/model/sm_context_retrieved_data.c @@ -168,16 +168,28 @@ OpenAPI_sm_context_retrieved_data_t *OpenAPI_sm_context_retrieved_data_parseFrom sm_context = cJSON_GetObjectItemCaseSensitive(sm_context_retrieved_dataJSON, "smContext"); if (sm_context) { sm_context_local_nonprim = OpenAPI_sm_context_parseFromJSON(sm_context); + if (!sm_context_local_nonprim) { + ogs_error("OpenAPI_sm_context_parseFromJSON failed [sm_context]"); + goto end; + } } small_data_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_retrieved_dataJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_retrieved_dataJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } dl_data_waiting_ind = cJSON_GetObjectItemCaseSensitive(sm_context_retrieved_dataJSON, "dlDataWaitingInd"); @@ -191,6 +203,10 @@ OpenAPI_sm_context_retrieved_data_t *OpenAPI_sm_context_retrieved_data_parseFrom af_coordination_info = cJSON_GetObjectItemCaseSensitive(sm_context_retrieved_dataJSON, "afCoordinationInfo"); if (af_coordination_info) { af_coordination_info_local_nonprim = OpenAPI_af_coordination_info_parseFromJSON(af_coordination_info); + if (!af_coordination_info_local_nonprim) { + ogs_error("OpenAPI_af_coordination_info_parseFromJSON failed [af_coordination_info]"); + goto end; + } } sm_context_retrieved_data_local_var = OpenAPI_sm_context_retrieved_data_create ( diff --git a/lib/sbi/openapi/model/sm_context_status_notification.c b/lib/sbi/openapi/model/sm_context_status_notification.c index 93ae86d67..911edbe96 100644 --- a/lib/sbi/openapi/model/sm_context_status_notification.c +++ b/lib/sbi/openapi/model/sm_context_status_notification.c @@ -298,15 +298,27 @@ OpenAPI_sm_context_status_notification_t *OpenAPI_sm_context_status_notification goto end; } status_info_local_nonprim = OpenAPI_status_info_parseFromJSON(status_info); + if (!status_info_local_nonprim) { + ogs_error("OpenAPI_status_info_parseFromJSON failed [status_info]"); + goto end; + } small_data_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_status_notificationJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(sm_context_status_notificationJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } ddn_failure_status = cJSON_GetObjectItemCaseSensitive(sm_context_status_notificationJSON, "ddnFailureStatus"); @@ -397,6 +409,10 @@ OpenAPI_sm_context_status_notification_t *OpenAPI_sm_context_status_notification target_dnai_info = cJSON_GetObjectItemCaseSensitive(sm_context_status_notificationJSON, "targetDnaiInfo"); if (target_dnai_info) { target_dnai_info_local_nonprim = OpenAPI_target_dnai_info_parseFromJSON(target_dnai_info); + if (!target_dnai_info_local_nonprim) { + ogs_error("OpenAPI_target_dnai_info_parseFromJSON failed [target_dnai_info]"); + goto end; + } } old_pdu_session_ref = cJSON_GetObjectItemCaseSensitive(sm_context_status_notificationJSON, "oldPduSessionRef"); diff --git a/lib/sbi/openapi/model/sm_context_update_data.c b/lib/sbi/openapi/model/sm_context_update_data.c index 0350c30d9..7ca6c5780 100644 --- a/lib/sbi/openapi/model/sm_context_update_data.c +++ b/lib/sbi/openapi/model/sm_context_update_data.c @@ -1007,11 +1007,19 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c guami = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "guami"); if (guami) { guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami); + if (!guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [guami]"); + goto end; + } } serving_network = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } backup_amf_info = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "backupAmfInfo"); @@ -1032,7 +1040,6 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local); if (!backup_amf_infoItem) { ogs_error("No backup_amf_infoItem"); - OpenAPI_list_free(backup_amf_infoList); goto end; } OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem); @@ -1087,6 +1094,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "ueTimeZone"); @@ -1100,6 +1111,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c add_ue_location = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } up_cnx_state = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "upCnxState"); @@ -1139,11 +1154,19 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c n1_sm_msg = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n1SmMsg"); if (n1_sm_msg) { n1_sm_msg_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_msg); + if (!n1_sm_msg_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_msg]"); + goto end; + } } n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n2SmInfoType"); @@ -1158,6 +1181,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c target_id = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "targetId"); if (target_id) { target_id_local_nonprim = OpenAPI_ng_ran_target_id_parseFromJSON(target_id); + if (!target_id_local_nonprim) { + ogs_error("OpenAPI_ng_ran_target_id_parseFromJSON failed [target_id]"); + goto end; + } } target_serving_nf_id = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "targetServingNfId"); @@ -1187,6 +1214,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c n9_forwarding_tunnel = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n9ForwardingTunnel"); if (n9_forwarding_tunnel) { n9_forwarding_tunnel_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(n9_forwarding_tunnel); + if (!n9_forwarding_tunnel_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [n9_forwarding_tunnel]"); + goto end; + } } n9_dl_forwarding_tnl_list = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n9DlForwardingTnlList"); @@ -1207,7 +1238,6 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c OpenAPI_indirect_data_forwarding_tunnel_info_t *n9_dl_forwarding_tnl_listItem = OpenAPI_indirect_data_forwarding_tunnel_info_parseFromJSON(n9_dl_forwarding_tnl_list_local); if (!n9_dl_forwarding_tnl_listItem) { ogs_error("No n9_dl_forwarding_tnl_listItem"); - OpenAPI_list_free(n9_dl_forwarding_tnl_listList); goto end; } OpenAPI_list_add(n9_dl_forwarding_tnl_listList, n9_dl_forwarding_tnl_listItem); @@ -1232,7 +1262,6 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c OpenAPI_indirect_data_forwarding_tunnel_info_t *n9_ul_forwarding_tnl_listItem = OpenAPI_indirect_data_forwarding_tunnel_info_parseFromJSON(n9_ul_forwarding_tnl_list_local); if (!n9_ul_forwarding_tnl_listItem) { ogs_error("No n9_ul_forwarding_tnl_listItem"); - OpenAPI_list_free(n9_ul_forwarding_tnl_listList); goto end; } OpenAPI_list_add(n9_ul_forwarding_tnl_listList, n9_ul_forwarding_tnl_listItem); @@ -1242,6 +1271,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c n9_dl_forwarding_tunnel = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n9DlForwardingTunnel"); if (n9_dl_forwarding_tunnel) { n9_dl_forwarding_tunnel_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(n9_dl_forwarding_tunnel); + if (!n9_dl_forwarding_tunnel_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [n9_dl_forwarding_tunnel]"); + goto end; + } } n9_inactivity_timer = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n9InactivityTimer"); @@ -1320,6 +1353,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c ng_ap_cause = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause_value = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "5gMmCauseValue"); @@ -1333,11 +1370,19 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c s_nssai = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } eps_interworking_ind = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "epsInterworkingInd"); @@ -1360,6 +1405,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c n2_sm_info_ext1 = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n2SmInfoExt1"); if (n2_sm_info_ext1) { n2_sm_info_ext1_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info_ext1); + if (!n2_sm_info_ext1_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info_ext1]"); + goto end; + } } n2_sm_info_type_ext1 = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "n2SmInfoTypeExt1"); @@ -1399,6 +1448,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c exemption_ind = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "exemptionInd"); if (exemption_ind) { exemption_ind_local_nonprim = OpenAPI_exemption_ind_parseFromJSON(exemption_ind); + if (!exemption_ind_local_nonprim) { + ogs_error("OpenAPI_exemption_ind_parseFromJSON failed [exemption_ind]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "supportedFeatures"); @@ -1412,6 +1465,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c mo_exp_data_counter = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "moExpDataCounter"); if (mo_exp_data_counter) { mo_exp_data_counter_local_nonprim = OpenAPI_mo_exp_data_counter_parseFromJSON(mo_exp_data_counter); + if (!mo_exp_data_counter_local_nonprim) { + ogs_error("OpenAPI_mo_exp_data_counter_parseFromJSON failed [mo_exp_data_counter]"); + goto end; + } } extended_nas_sm_timer_ind = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "extendedNasSmTimerInd"); @@ -1454,6 +1511,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c ddn_failure_subs = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "ddnFailureSubs"); if (ddn_failure_subs) { ddn_failure_subs_local_nonprim = OpenAPI_ddn_failure_subs_parseFromJSON(ddn_failure_subs); + if (!ddn_failure_subs_local_nonprim) { + ogs_error("OpenAPI_ddn_failure_subs_parseFromJSON failed [ddn_failure_subs]"); + goto end; + } } skip_n2_pdu_session_res_rel_ind = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "skipN2PduSessionResRelInd"); @@ -1497,6 +1558,10 @@ OpenAPI_sm_context_update_data_t *OpenAPI_sm_context_update_data_parseFromJSON(c pcf_ue_callback_info = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "pcfUeCallbackInfo"); if (pcf_ue_callback_info) { pcf_ue_callback_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_callback_info); + if (!pcf_ue_callback_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_callback_info]"); + goto end; + } } satellite_backhaul_cat = cJSON_GetObjectItemCaseSensitive(sm_context_update_dataJSON, "satelliteBackhaulCat"); diff --git a/lib/sbi/openapi/model/sm_context_update_error.c b/lib/sbi/openapi/model/sm_context_update_error.c index 8c3d06532..4c7e20353 100644 --- a/lib/sbi/openapi/model/sm_context_update_error.c +++ b/lib/sbi/openapi/model/sm_context_update_error.c @@ -150,15 +150,27 @@ OpenAPI_sm_context_update_error_t *OpenAPI_sm_context_update_error_parseFromJSON goto end; } error_local_nonprim = OpenAPI_ext_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_ext_problem_details_parseFromJSON failed [error]"); + goto end; + } n1_sm_msg = cJSON_GetObjectItemCaseSensitive(sm_context_update_errorJSON, "n1SmMsg"); if (n1_sm_msg) { n1_sm_msg_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_msg); + if (!n1_sm_msg_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_msg]"); + goto end; + } } n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_update_errorJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_update_errorJSON, "n2SmInfoType"); diff --git a/lib/sbi/openapi/model/sm_context_updated_data.c b/lib/sbi/openapi/model/sm_context_updated_data.c index 5836d9a28..cb7551ffe 100644 --- a/lib/sbi/openapi/model/sm_context_updated_data.c +++ b/lib/sbi/openapi/model/sm_context_updated_data.c @@ -511,7 +511,6 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON OpenAPI_ebi_arp_mapping_t *allocated_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(allocated_ebi_list_local); if (!allocated_ebi_listItem) { ogs_error("No allocated_ebi_listItem"); - OpenAPI_list_free(allocated_ebi_listList); goto end; } OpenAPI_list_add(allocated_ebi_listList, allocated_ebi_listItem); @@ -536,7 +535,6 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON OpenAPI_ebi_arp_mapping_t *modified_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(modified_ebi_list_local); if (!modified_ebi_listItem) { ogs_error("No modified_ebi_listItem"); - OpenAPI_list_free(modified_ebi_listList); goto end; } OpenAPI_list_add(modified_ebi_listList, modified_ebi_listItem); @@ -546,11 +544,19 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON n1_sm_msg = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "n1SmMsg"); if (n1_sm_msg) { n1_sm_msg_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_msg); + if (!n1_sm_msg_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_msg]"); + goto end; + } } n2_sm_info = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "n2SmInfo"); if (n2_sm_info) { n2_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n2_sm_info); + if (!n2_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n2_sm_info]"); + goto end; + } } n2_sm_info_type = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "n2SmInfoType"); @@ -609,7 +615,6 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON OpenAPI_indirect_data_forwarding_tunnel_info_t *n3_dl_forwarding_tnl_listItem = OpenAPI_indirect_data_forwarding_tunnel_info_parseFromJSON(n3_dl_forwarding_tnl_list_local); if (!n3_dl_forwarding_tnl_listItem) { ogs_error("No n3_dl_forwarding_tnl_listItem"); - OpenAPI_list_free(n3_dl_forwarding_tnl_listList); goto end; } OpenAPI_list_add(n3_dl_forwarding_tnl_listList, n3_dl_forwarding_tnl_listItem); @@ -634,7 +639,6 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON OpenAPI_indirect_data_forwarding_tunnel_info_t *n3_ul_forwarding_tnl_listItem = OpenAPI_indirect_data_forwarding_tunnel_info_parseFromJSON(n3_ul_forwarding_tnl_list_local); if (!n3_ul_forwarding_tnl_listItem) { ogs_error("No n3_ul_forwarding_tnl_listItem"); - OpenAPI_list_free(n3_ul_forwarding_tnl_listList); goto end; } OpenAPI_list_add(n3_ul_forwarding_tnl_listList, n3_ul_forwarding_tnl_listItem); @@ -644,6 +648,10 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON n9_ul_forwarding_tunnel = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "n9UlForwardingTunnel"); if (n9_ul_forwarding_tunnel) { n9_ul_forwarding_tunnel_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(n9_ul_forwarding_tunnel); + if (!n9_ul_forwarding_tunnel_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [n9_ul_forwarding_tunnel]"); + goto end; + } } cause = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "cause"); @@ -727,6 +735,10 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON anchor_smf_features = cJSON_GetObjectItemCaseSensitive(sm_context_updated_dataJSON, "anchorSmfFeatures"); if (anchor_smf_features) { anchor_smf_features_local_nonprim = OpenAPI_anchor_smf_features_parseFromJSON(anchor_smf_features); + if (!anchor_smf_features_local_nonprim) { + ogs_error("OpenAPI_anchor_smf_features_parseFromJSON failed [anchor_smf_features]"); + goto end; + } } sm_context_updated_data_local_var = OpenAPI_sm_context_updated_data_create ( diff --git a/lib/sbi/openapi/model/sm_policy_context_data.c b/lib/sbi/openapi/model/sm_policy_context_data.c index c5dbbaf2d..5faca25b7 100644 --- a/lib/sbi/openapi/model/sm_policy_context_data.c +++ b/lib/sbi/openapi/model/sm_policy_context_data.c @@ -813,11 +813,19 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c acc_net_ch_id = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "accNetChId"); if (acc_net_ch_id) { acc_net_ch_id_local_nonprim = OpenAPI_acc_net_ch_id_parseFromJSON(acc_net_ch_id); + if (!acc_net_ch_id_local_nonprim) { + ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON failed [acc_net_ch_id]"); + goto end; + } } charg_entity_addr = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "chargEntityAddr"); if (charg_entity_addr) { charg_entity_addr_local_nonprim = OpenAPI_acc_net_charging_address_parseFromJSON(charg_entity_addr); + if (!charg_entity_addr_local_nonprim) { + ogs_error("OpenAPI_acc_net_charging_address_parseFromJSON failed [charg_entity_addr]"); + goto end; + } } gpsi = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "gpsi"); @@ -946,16 +954,28 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c add_access_info = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "addAccessInfo"); if (add_access_info) { add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info); + if (!add_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [add_access_info]"); + goto end; + } } serving_network = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } user_location_info = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "userLocationInfo"); if (user_location_info) { user_location_info_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location_info); + if (!user_location_info_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_location_info]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "ueTimeZone"); @@ -1001,6 +1021,10 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c subs_sess_ambr = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "subsSessAmbr"); if (subs_sess_ambr) { subs_sess_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(subs_sess_ambr); + if (!subs_sess_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [subs_sess_ambr]"); + goto end; + } } auth_prof_index = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "authProfIndex"); @@ -1014,11 +1038,19 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c subs_def_qos = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "subsDefQos"); if (subs_def_qos) { subs_def_qos_local_nonprim = OpenAPI_subscribed_default_qos_parseFromJSON(subs_def_qos); + if (!subs_def_qos_local_nonprim) { + ogs_error("OpenAPI_subscribed_default_qos_parseFromJSON failed [subs_def_qos]"); + goto end; + } } vplmn_qos = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "vplmnQos"); if (vplmn_qos) { vplmn_qos_local_nonprim = OpenAPI_vplmn_qos_parseFromJSON(vplmn_qos); + if (!vplmn_qos_local_nonprim) { + ogs_error("OpenAPI_vplmn_qos_parseFromJSON failed [vplmn_qos]"); + goto end; + } } num_of_pack_filter = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "numOfPackFilter"); @@ -1064,6 +1096,10 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c trace_req = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "traceReq"); if (trace_req) { trace_req_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_req); + if (!trace_req_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_req]"); + goto end; + } } slice_info = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "sliceInfo"); @@ -1072,6 +1108,10 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c goto end; } slice_info_local_nonprim = OpenAPI_snssai_parseFromJSON(slice_info); + if (!slice_info_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [slice_info]"); + goto end; + } qos_flow_usage = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "qosFlowUsage"); if (qos_flow_usage) { @@ -1085,6 +1125,10 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c serv_nf_id = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "servNfId"); if (serv_nf_id) { serv_nf_id_local_nonprim = OpenAPI_serving_nf_identity_parseFromJSON(serv_nf_id); + if (!serv_nf_id_local_nonprim) { + ogs_error("OpenAPI_serving_nf_identity_parseFromJSON failed [serv_nf_id]"); + goto end; + } } supp_feat = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "suppFeat"); @@ -1183,6 +1227,10 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c pcf_ue_info = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "pcfUeInfo"); if (pcf_ue_info) { pcf_ue_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_info); + if (!pcf_ue_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_info]"); + goto end; + } } pvs_info = cJSON_GetObjectItemCaseSensitive(sm_policy_context_dataJSON, "pvsInfo"); @@ -1203,7 +1251,6 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local); if (!pvs_infoItem) { ogs_error("No pvs_infoItem"); - OpenAPI_list_free(pvs_infoList); goto end; } OpenAPI_list_add(pvs_infoList, pvs_infoItem); @@ -1236,7 +1283,6 @@ OpenAPI_sm_policy_context_data_t *OpenAPI_sm_policy_context_data_parseFromJSON(c OpenAPI_nwdaf_data_t *nwdaf_datasItem = OpenAPI_nwdaf_data_parseFromJSON(nwdaf_datas_local); if (!nwdaf_datasItem) { ogs_error("No nwdaf_datasItem"); - OpenAPI_list_free(nwdaf_datasList); goto end; } OpenAPI_list_add(nwdaf_datasList, nwdaf_datasItem); diff --git a/lib/sbi/openapi/model/sm_policy_control.c b/lib/sbi/openapi/model/sm_policy_control.c index 61af77adf..709beca82 100644 --- a/lib/sbi/openapi/model/sm_policy_control.c +++ b/lib/sbi/openapi/model/sm_policy_control.c @@ -95,6 +95,10 @@ OpenAPI_sm_policy_control_t *OpenAPI_sm_policy_control_parseFromJSON(cJSON *sm_p goto end; } context_local_nonprim = OpenAPI_sm_policy_context_data_parseFromJSON(context); + if (!context_local_nonprim) { + ogs_error("OpenAPI_sm_policy_context_data_parseFromJSON failed [context]"); + goto end; + } policy = cJSON_GetObjectItemCaseSensitive(sm_policy_controlJSON, "policy"); if (!policy) { @@ -102,6 +106,10 @@ OpenAPI_sm_policy_control_t *OpenAPI_sm_policy_control_parseFromJSON(cJSON *sm_p goto end; } policy_local_nonprim = OpenAPI_sm_policy_decision_parseFromJSON(policy); + if (!policy_local_nonprim) { + ogs_error("OpenAPI_sm_policy_decision_parseFromJSON failed [policy]"); + goto end; + } sm_policy_control_local_var = OpenAPI_sm_policy_control_create ( context_local_nonprim, diff --git a/lib/sbi/openapi/model/sm_policy_decision.c b/lib/sbi/openapi/model/sm_policy_decision.c index 66aa6df8e..8a9c927da 100644 --- a/lib/sbi/openapi/model/sm_policy_decision.c +++ b/lib/sbi/openapi/model/sm_policy_decision.c @@ -824,6 +824,10 @@ OpenAPI_sm_policy_decision_t *OpenAPI_sm_policy_decision_parseFromJSON(cJSON *sm charging_info = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "chargingInfo"); if (charging_info) { charging_info_local_nonprim = OpenAPI_charging_information_parseFromJSON(charging_info); + if (!charging_info_local_nonprim) { + ogs_error("OpenAPI_charging_information_parseFromJSON failed [charging_info]"); + goto end; + } } traff_cont_decs = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "traffContDecs"); @@ -1033,7 +1037,6 @@ OpenAPI_sm_policy_decision_t *OpenAPI_sm_policy_decision_parseFromJSON(cJSON *sm OpenAPI_requested_rule_data_t *last_req_rule_dataItem = OpenAPI_requested_rule_data_parseFromJSON(last_req_rule_data_local); if (!last_req_rule_dataItem) { ogs_error("No last_req_rule_dataItem"); - OpenAPI_list_free(last_req_rule_dataList); goto end; } OpenAPI_list_add(last_req_rule_dataList, last_req_rule_dataItem); @@ -1043,6 +1046,10 @@ OpenAPI_sm_policy_decision_t *OpenAPI_sm_policy_decision_parseFromJSON(cJSON *sm last_req_usage_data = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "lastReqUsageData"); if (last_req_usage_data) { last_req_usage_data_local_nonprim = OpenAPI_requested_usage_data_parseFromJSON(last_req_usage_data); + if (!last_req_usage_data_local_nonprim) { + ogs_error("OpenAPI_requested_usage_data_parseFromJSON failed [last_req_usage_data]"); + goto end; + } } pra_infos = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "praInfos"); @@ -1116,11 +1123,19 @@ OpenAPI_sm_policy_decision_t *OpenAPI_sm_policy_decision_parseFromJSON(cJSON *sm tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(sm_policy_decisionJSON, "tsnPortManContNwtts"); @@ -1141,7 +1156,6 @@ OpenAPI_sm_policy_decision_t *OpenAPI_sm_policy_decision_parseFromJSON(cJSON *sm OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); diff --git a/lib/sbi/openapi/model/sm_policy_delete_data.c b/lib/sbi/openapi/model/sm_policy_delete_data.c index c863160bf..20dd3ae55 100644 --- a/lib/sbi/openapi/model/sm_policy_delete_data.c +++ b/lib/sbi/openapi/model/sm_policy_delete_data.c @@ -208,6 +208,10 @@ OpenAPI_sm_policy_delete_data_t *OpenAPI_sm_policy_delete_data_parseFromJSON(cJS user_location_info = cJSON_GetObjectItemCaseSensitive(sm_policy_delete_dataJSON, "userLocationInfo"); if (user_location_info) { user_location_info_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location_info); + if (!user_location_info_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_location_info]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_policy_delete_dataJSON, "ueTimeZone"); @@ -221,6 +225,10 @@ OpenAPI_sm_policy_delete_data_t *OpenAPI_sm_policy_delete_data_parseFromJSON(cJS serving_network = cJSON_GetObjectItemCaseSensitive(sm_policy_delete_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } user_location_info_time = cJSON_GetObjectItemCaseSensitive(sm_policy_delete_dataJSON, "userLocationInfoTime"); @@ -249,7 +257,6 @@ OpenAPI_sm_policy_delete_data_t *OpenAPI_sm_policy_delete_data_parseFromJSON(cJS OpenAPI_ran_nas_rel_cause_t *ran_nas_rel_causesItem = OpenAPI_ran_nas_rel_cause_parseFromJSON(ran_nas_rel_causes_local); if (!ran_nas_rel_causesItem) { ogs_error("No ran_nas_rel_causesItem"); - OpenAPI_list_free(ran_nas_rel_causesList); goto end; } OpenAPI_list_add(ran_nas_rel_causesList, ran_nas_rel_causesItem); @@ -274,7 +281,6 @@ OpenAPI_sm_policy_delete_data_t *OpenAPI_sm_policy_delete_data_parseFromJSON(cJS OpenAPI_accu_usage_report_t *accu_usage_reportsItem = OpenAPI_accu_usage_report_parseFromJSON(accu_usage_reports_local); if (!accu_usage_reportsItem) { ogs_error("No accu_usage_reportsItem"); - OpenAPI_list_free(accu_usage_reportsList); goto end; } OpenAPI_list_add(accu_usage_reportsList, accu_usage_reportsItem); @@ -308,7 +314,6 @@ OpenAPI_sm_policy_delete_data_t *OpenAPI_sm_policy_delete_data_parseFromJSON(cJS OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local); if (!qos_mon_reportsItem) { ogs_error("No qos_mon_reportsItem"); - OpenAPI_list_free(qos_mon_reportsList); goto end; } OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem); diff --git a/lib/sbi/openapi/model/sm_policy_dnn_data.c b/lib/sbi/openapi/model/sm_policy_dnn_data.c index 5ef69597f..c2760a106 100644 --- a/lib/sbi/openapi/model/sm_policy_dnn_data.c +++ b/lib/sbi/openapi/model/sm_policy_dnn_data.c @@ -525,6 +525,10 @@ OpenAPI_sm_policy_dnn_data_t *OpenAPI_sm_policy_dnn_data_parseFromJSON(cJSON *sm chf_info = cJSON_GetObjectItemCaseSensitive(sm_policy_dnn_dataJSON, "chfInfo"); if (chf_info) { chf_info_local_nonprim = OpenAPI_charging_information_parseFromJSON(chf_info); + if (!chf_info_local_nonprim) { + ogs_error("OpenAPI_charging_information_parseFromJSON failed [chf_info]"); + goto end; + } } ref_um_data_limit_ids = cJSON_GetObjectItemCaseSensitive(sm_policy_dnn_dataJSON, "refUmDataLimitIds"); diff --git a/lib/sbi/openapi/model/sm_policy_notification.c b/lib/sbi/openapi/model/sm_policy_notification.c index 233b46198..368e097d6 100644 --- a/lib/sbi/openapi/model/sm_policy_notification.c +++ b/lib/sbi/openapi/model/sm_policy_notification.c @@ -89,6 +89,10 @@ OpenAPI_sm_policy_notification_t *OpenAPI_sm_policy_notification_parseFromJSON(c sm_policy_decision = cJSON_GetObjectItemCaseSensitive(sm_policy_notificationJSON, "smPolicyDecision"); if (sm_policy_decision) { sm_policy_decision_local_nonprim = OpenAPI_sm_policy_decision_parseFromJSON(sm_policy_decision); + if (!sm_policy_decision_local_nonprim) { + ogs_error("OpenAPI_sm_policy_decision_parseFromJSON failed [sm_policy_decision]"); + goto end; + } } sm_policy_notification_local_var = OpenAPI_sm_policy_notification_create ( diff --git a/lib/sbi/openapi/model/sm_policy_snssai_data.c b/lib/sbi/openapi/model/sm_policy_snssai_data.c index 947378e1b..1a0204dd5 100644 --- a/lib/sbi/openapi/model/sm_policy_snssai_data.c +++ b/lib/sbi/openapi/model/sm_policy_snssai_data.c @@ -129,6 +129,10 @@ OpenAPI_sm_policy_snssai_data_t *OpenAPI_sm_policy_snssai_data_parseFromJSON(cJS goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } sm_policy_dnn_data = cJSON_GetObjectItemCaseSensitive(sm_policy_snssai_dataJSON, "smPolicyDnnData"); if (sm_policy_dnn_data) { @@ -159,6 +163,10 @@ OpenAPI_sm_policy_snssai_data_t *OpenAPI_sm_policy_snssai_data_parseFromJSON(cJS ue_slice_mbr = cJSON_GetObjectItemCaseSensitive(sm_policy_snssai_dataJSON, "ueSliceMbr"); if (ue_slice_mbr) { ue_slice_mbr_local_nonprim = OpenAPI_slice_mbr_1_parseFromJSON(ue_slice_mbr); + if (!ue_slice_mbr_local_nonprim) { + ogs_error("OpenAPI_slice_mbr_1_parseFromJSON failed [ue_slice_mbr]"); + goto end; + } } sm_policy_snssai_data_local_var = OpenAPI_sm_policy_snssai_data_create ( diff --git a/lib/sbi/openapi/model/sm_policy_snssai_data_patch.c b/lib/sbi/openapi/model/sm_policy_snssai_data_patch.c index 76029784f..532f85949 100644 --- a/lib/sbi/openapi/model/sm_policy_snssai_data_patch.c +++ b/lib/sbi/openapi/model/sm_policy_snssai_data_patch.c @@ -108,6 +108,10 @@ OpenAPI_sm_policy_snssai_data_patch_t *OpenAPI_sm_policy_snssai_data_patch_parse goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } sm_policy_dnn_data = cJSON_GetObjectItemCaseSensitive(sm_policy_snssai_data_patchJSON, "smPolicyDnnData"); if (sm_policy_dnn_data) { diff --git a/lib/sbi/openapi/model/sm_policy_update_context_data.c b/lib/sbi/openapi/model/sm_policy_update_context_data.c index b6acf171e..6ccde103b 100644 --- a/lib/sbi/openapi/model/sm_policy_update_context_data.c +++ b/lib/sbi/openapi/model/sm_policy_update_context_data.c @@ -1144,7 +1144,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_acc_net_ch_id_t *acc_net_ch_idsItem = OpenAPI_acc_net_ch_id_parseFromJSON(acc_net_ch_ids_local); if (!acc_net_ch_idsItem) { ogs_error("No acc_net_ch_idsItem"); - OpenAPI_list_free(acc_net_ch_idsList); goto end; } OpenAPI_list_add(acc_net_ch_idsList, acc_net_ch_idsItem); @@ -1172,21 +1171,37 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p add_access_info = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "addAccessInfo"); if (add_access_info) { add_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(add_access_info); + if (!add_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [add_access_info]"); + goto end; + } } rel_access_info = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "relAccessInfo"); if (rel_access_info) { rel_access_info_local_nonprim = OpenAPI_additional_access_info_parseFromJSON(rel_access_info); + if (!rel_access_info_local_nonprim) { + ogs_error("OpenAPI_additional_access_info_parseFromJSON failed [rel_access_info]"); + goto end; + } } serving_network = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } user_location_info = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "userLocationInfo"); if (user_location_info) { user_location_info_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location_info); + if (!user_location_info_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_location_info]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "ueTimeZone"); @@ -1272,6 +1287,10 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p subs_sess_ambr = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "subsSessAmbr"); if (subs_sess_ambr) { subs_sess_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(subs_sess_ambr); + if (!subs_sess_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [subs_sess_ambr]"); + goto end; + } } auth_prof_index = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "authProfIndex"); @@ -1285,11 +1304,19 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p subs_def_qos = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "subsDefQos"); if (subs_def_qos) { subs_def_qos_local_nonprim = OpenAPI_subscribed_default_qos_parseFromJSON(subs_def_qos); + if (!subs_def_qos_local_nonprim) { + ogs_error("OpenAPI_subscribed_default_qos_parseFromJSON failed [subs_def_qos]"); + goto end; + } } vplmn_qos = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "vplmnQos"); if (vplmn_qos) { vplmn_qos_local_nonprim = OpenAPI_vplmn_qos_parseFromJSON(vplmn_qos); + if (!vplmn_qos_local_nonprim) { + ogs_error("OpenAPI_vplmn_qos_parseFromJSON failed [vplmn_qos]"); + goto end; + } } vplmn_qos_not_app = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "vplmnQosNotApp"); @@ -1326,7 +1353,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_accu_usage_report_t *accu_usage_reportsItem = OpenAPI_accu_usage_report_parseFromJSON(accu_usage_reports_local); if (!accu_usage_reportsItem) { ogs_error("No accu_usage_reportsItem"); - OpenAPI_list_free(accu_usage_reportsList); goto end; } OpenAPI_list_add(accu_usage_reportsList, accu_usage_reportsItem); @@ -1359,7 +1385,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_app_detection_info_t *app_detection_infosItem = OpenAPI_app_detection_info_parseFromJSON(app_detection_infos_local); if (!app_detection_infosItem) { ogs_error("No app_detection_infosItem"); - OpenAPI_list_free(app_detection_infosList); goto end; } OpenAPI_list_add(app_detection_infosList, app_detection_infosItem); @@ -1384,7 +1409,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_rule_report_t *rule_reportsItem = OpenAPI_rule_report_parseFromJSON(rule_reports_local); if (!rule_reportsItem) { ogs_error("No rule_reportsItem"); - OpenAPI_list_free(rule_reportsList); goto end; } OpenAPI_list_add(rule_reportsList, rule_reportsItem); @@ -1409,7 +1433,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_session_rule_report_t *sess_rule_reportsItem = OpenAPI_session_rule_report_parseFromJSON(sess_rule_reports_local); if (!sess_rule_reportsItem) { ogs_error("No sess_rule_reportsItem"); - OpenAPI_list_free(sess_rule_reportsList); goto end; } OpenAPI_list_add(sess_rule_reportsList, sess_rule_reportsItem); @@ -1434,7 +1457,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_qos_notification_control_info_t *qnc_reportsItem = OpenAPI_qos_notification_control_info_parseFromJSON(qnc_reports_local); if (!qnc_reportsItem) { ogs_error("No qnc_reportsItem"); - OpenAPI_list_free(qnc_reportsList); goto end; } OpenAPI_list_add(qnc_reportsList, qnc_reportsItem); @@ -1459,7 +1481,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_qos_monitoring_report_t *qos_mon_reportsItem = OpenAPI_qos_monitoring_report_parseFromJSON(qos_mon_reports_local); if (!qos_mon_reportsItem) { ogs_error("No qos_mon_reportsItem"); - OpenAPI_list_free(qos_mon_reportsList); goto end; } OpenAPI_list_add(qos_mon_reportsList, qos_mon_reportsItem); @@ -1503,6 +1524,10 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p ue_init_res_req = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "ueInitResReq"); if (ue_init_res_req) { ue_init_res_req_local_nonprim = OpenAPI_ue_initiated_resource_request_parseFromJSON(ue_init_res_req); + if (!ue_init_res_req_local_nonprim) { + ogs_error("OpenAPI_ue_initiated_resource_request_parseFromJSON failed [ue_init_res_req]"); + goto end; + } } ref_qos_indication = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "refQosIndication"); @@ -1534,11 +1559,19 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p serv_nf_id = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "servNfId"); if (serv_nf_id) { serv_nf_id_local_nonprim = OpenAPI_serving_nf_identity_parseFromJSON(serv_nf_id); + if (!serv_nf_id_local_nonprim) { + ogs_error("OpenAPI_serving_nf_identity_parseFromJSON failed [serv_nf_id]"); + goto end; + } } trace_req = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "traceReq"); if (trace_req) { trace_req_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_req); + if (!trace_req_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_req]"); + goto end; + } } ma_pdu_ind = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "maPduInd"); @@ -1562,16 +1595,28 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p tsn_bridge_info = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "tsnBridgeInfo"); if (tsn_bridge_info) { tsn_bridge_info_local_nonprim = OpenAPI_tsn_bridge_info_parseFromJSON(tsn_bridge_info); + if (!tsn_bridge_info_local_nonprim) { + ogs_error("OpenAPI_tsn_bridge_info_parseFromJSON failed [tsn_bridge_info]"); + goto end; + } } tsn_bridge_man_cont = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "tsnBridgeManCont"); if (tsn_bridge_man_cont) { tsn_bridge_man_cont_local_nonprim = OpenAPI_bridge_management_container_parseFromJSON(tsn_bridge_man_cont); + if (!tsn_bridge_man_cont_local_nonprim) { + ogs_error("OpenAPI_bridge_management_container_parseFromJSON failed [tsn_bridge_man_cont]"); + goto end; + } } tsn_port_man_cont_dstt = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "tsnPortManContDstt"); if (tsn_port_man_cont_dstt) { tsn_port_man_cont_dstt_local_nonprim = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_dstt); + if (!tsn_port_man_cont_dstt_local_nonprim) { + ogs_error("OpenAPI_port_management_container_parseFromJSON failed [tsn_port_man_cont_dstt]"); + goto end; + } } tsn_port_man_cont_nwtts = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "tsnPortManContNwtts"); @@ -1592,7 +1637,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_port_management_container_t *tsn_port_man_cont_nwttsItem = OpenAPI_port_management_container_parseFromJSON(tsn_port_man_cont_nwtts_local); if (!tsn_port_man_cont_nwttsItem) { ogs_error("No tsn_port_man_cont_nwttsItem"); - OpenAPI_list_free(tsn_port_man_cont_nwttsList); goto end; } OpenAPI_list_add(tsn_port_man_cont_nwttsList, tsn_port_man_cont_nwttsItem); @@ -1617,7 +1661,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_ip_multicast_address_info_t *mul_addr_infosItem = OpenAPI_ip_multicast_address_info_parseFromJSON(mul_addr_infos_local); if (!mul_addr_infosItem) { ogs_error("No mul_addr_infosItem"); - OpenAPI_list_free(mul_addr_infosList); goto end; } OpenAPI_list_add(mul_addr_infosList, mul_addr_infosItem); @@ -1661,7 +1704,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_invalid_param_t *invalid_policy_decsItem = OpenAPI_invalid_param_parseFromJSON(invalid_policy_decs_local); if (!invalid_policy_decsItem) { ogs_error("No invalid_policy_decsItem"); - OpenAPI_list_free(invalid_policy_decsList); goto end; } OpenAPI_list_add(invalid_policy_decsList, invalid_policy_decsItem); @@ -1686,7 +1728,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_ddd_traffic_descriptor_t *traffic_descriptorsItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(traffic_descriptors_local); if (!traffic_descriptorsItem) { ogs_error("No traffic_descriptorsItem"); - OpenAPI_list_free(traffic_descriptorsList); goto end; } OpenAPI_list_add(traffic_descriptorsList, traffic_descriptorsItem); @@ -1753,6 +1794,10 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p pcf_ue_info = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "pcfUeInfo"); if (pcf_ue_info) { pcf_ue_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_info); + if (!pcf_ue_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_info]"); + goto end; + } } nwdaf_datas = cJSON_GetObjectItemCaseSensitive(sm_policy_update_context_dataJSON, "nwdafDatas"); @@ -1773,7 +1818,6 @@ OpenAPI_sm_policy_update_context_data_t *OpenAPI_sm_policy_update_context_data_p OpenAPI_nwdaf_data_t *nwdaf_datasItem = OpenAPI_nwdaf_data_parseFromJSON(nwdaf_datas_local); if (!nwdaf_datasItem) { ogs_error("No nwdaf_datasItem"); - OpenAPI_list_free(nwdaf_datasList); goto end; } OpenAPI_list_add(nwdaf_datasList, nwdaf_datasItem); diff --git a/lib/sbi/openapi/model/sm_subs_data.c b/lib/sbi/openapi/model/sm_subs_data.c index f37eded52..9fc7a6b6c 100644 --- a/lib/sbi/openapi/model/sm_subs_data.c +++ b/lib/sbi/openapi/model/sm_subs_data.c @@ -138,7 +138,6 @@ OpenAPI_sm_subs_data_t *OpenAPI_sm_subs_data_parseFromJSON(cJSON *sm_subs_dataJS OpenAPI_session_management_subscription_data_t *individual_sm_subs_dataItem = OpenAPI_session_management_subscription_data_parseFromJSON(individual_sm_subs_data_local); if (!individual_sm_subs_dataItem) { ogs_error("No individual_sm_subs_dataItem"); - OpenAPI_list_free(individual_sm_subs_dataList); goto end; } OpenAPI_list_add(individual_sm_subs_dataList, individual_sm_subs_dataItem); diff --git a/lib/sbi/openapi/model/small_data_rate_status_info.c b/lib/sbi/openapi/model/small_data_rate_status_info.c index 3fa2213d7..d5ee9d717 100644 --- a/lib/sbi/openapi/model/small_data_rate_status_info.c +++ b/lib/sbi/openapi/model/small_data_rate_status_info.c @@ -111,6 +111,10 @@ OpenAPI_small_data_rate_status_info_t *OpenAPI_small_data_rate_status_info_parse goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(small_data_rate_status_infoJSON, "Dnn"); if (!dnn) { @@ -128,6 +132,10 @@ OpenAPI_small_data_rate_status_info_t *OpenAPI_small_data_rate_status_info_parse goto end; } small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } small_data_rate_status_info_local_var = OpenAPI_small_data_rate_status_info_create ( snssai_local_nonprim, diff --git a/lib/sbi/openapi/model/smcce_info.c b/lib/sbi/openapi/model/smcce_info.c index 68f129dab..c00220cba 100644 --- a/lib/sbi/openapi/model/smcce_info.c +++ b/lib/sbi/openapi/model/smcce_info.c @@ -112,6 +112,10 @@ OpenAPI_smcce_info_t *OpenAPI_smcce_info_parseFromJSON(cJSON *smcce_infoJSON) snssai = cJSON_GetObjectItemCaseSensitive(smcce_infoJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } smcce_ue_list = cJSON_GetObjectItemCaseSensitive(smcce_infoJSON, "smcceUeList"); @@ -120,6 +124,10 @@ OpenAPI_smcce_info_t *OpenAPI_smcce_info_parseFromJSON(cJSON *smcce_infoJSON) goto end; } smcce_ue_list_local_nonprim = OpenAPI_smcce_ue_list_parseFromJSON(smcce_ue_list); + if (!smcce_ue_list_local_nonprim) { + ogs_error("OpenAPI_smcce_ue_list_parseFromJSON failed [smcce_ue_list]"); + goto end; + } smcce_info_local_var = OpenAPI_smcce_info_create ( dnn && !cJSON_IsNull(dnn) ? ogs_strdup(dnn->valuestring) : NULL, diff --git a/lib/sbi/openapi/model/smf_info.c b/lib/sbi/openapi/model/smf_info.c index d91ca11ee..044a60fcf 100644 --- a/lib/sbi/openapi/model/smf_info.c +++ b/lib/sbi/openapi/model/smf_info.c @@ -295,7 +295,6 @@ OpenAPI_smf_info_t *OpenAPI_smf_info_parseFromJSON(cJSON *smf_infoJSON) OpenAPI_snssai_smf_info_item_t *s_nssai_smf_info_listItem = OpenAPI_snssai_smf_info_item_parseFromJSON(s_nssai_smf_info_list_local); if (!s_nssai_smf_info_listItem) { ogs_error("No s_nssai_smf_info_listItem"); - OpenAPI_list_free(s_nssai_smf_info_listList); goto end; } OpenAPI_list_add(s_nssai_smf_info_listList, s_nssai_smf_info_listItem); @@ -319,7 +318,6 @@ OpenAPI_smf_info_t *OpenAPI_smf_info_parseFromJSON(cJSON *smf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -344,7 +342,6 @@ OpenAPI_smf_info_t *OpenAPI_smf_info_parseFromJSON(cJSON *smf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -377,7 +374,6 @@ OpenAPI_smf_info_t *OpenAPI_smf_info_parseFromJSON(cJSON *smf_infoJSON) OpenAPI_ip_addr_t *pgw_ip_addr_listItem = OpenAPI_ip_addr_parseFromJSON(pgw_ip_addr_list_local); if (!pgw_ip_addr_listItem) { ogs_error("No pgw_ip_addr_listItem"); - OpenAPI_list_free(pgw_ip_addr_listList); goto end; } OpenAPI_list_add(pgw_ip_addr_listList, pgw_ip_addr_listItem); diff --git a/lib/sbi/openapi/model/smf_registration.c b/lib/sbi/openapi/model/smf_registration.c index ecf42b02e..14fe47c5d 100644 --- a/lib/sbi/openapi/model/smf_registration.c +++ b/lib/sbi/openapi/model/smf_registration.c @@ -409,6 +409,10 @@ OpenAPI_smf_registration_t *OpenAPI_smf_registration_parseFromJSON(cJSON *smf_re goto end; } single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "dnn"); if (dnn) { @@ -440,6 +444,10 @@ OpenAPI_smf_registration_t *OpenAPI_smf_registration_parseFromJSON(cJSON *smf_re goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } pgw_fqdn = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "pgwFqdn"); if (pgw_fqdn) { @@ -452,6 +460,10 @@ OpenAPI_smf_registration_t *OpenAPI_smf_registration_parseFromJSON(cJSON *smf_re pgw_ip_addr = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "pgwIpAddr"); if (pgw_ip_addr) { pgw_ip_addr_local_nonprim = OpenAPI_ip_address_parseFromJSON(pgw_ip_addr); + if (!pgw_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_address_parseFromJSON failed [pgw_ip_addr]"); + goto end; + } } epdg_ind = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "epdgInd"); @@ -490,6 +502,10 @@ OpenAPI_smf_registration_t *OpenAPI_smf_registration_parseFromJSON(cJSON *smf_re context_info = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } pcf_id = cJSON_GetObjectItemCaseSensitive(smf_registrationJSON, "pcfId"); diff --git a/lib/sbi/openapi/model/smf_registration_info.c b/lib/sbi/openapi/model/smf_registration_info.c index dfd8c2046..6544c7a65 100644 --- a/lib/sbi/openapi/model/smf_registration_info.c +++ b/lib/sbi/openapi/model/smf_registration_info.c @@ -93,7 +93,6 @@ OpenAPI_smf_registration_info_t *OpenAPI_smf_registration_info_parseFromJSON(cJS OpenAPI_smf_registration_t *smf_registration_listItem = OpenAPI_smf_registration_parseFromJSON(smf_registration_list_local); if (!smf_registration_listItem) { ogs_error("No smf_registration_listItem"); - OpenAPI_list_free(smf_registration_listList); goto end; } OpenAPI_list_add(smf_registration_listList, smf_registration_listItem); diff --git a/lib/sbi/openapi/model/smf_registration_modification.c b/lib/sbi/openapi/model/smf_registration_modification.c index afcf5e06e..98117d016 100644 --- a/lib/sbi/openapi/model/smf_registration_modification.c +++ b/lib/sbi/openapi/model/smf_registration_modification.c @@ -115,6 +115,10 @@ OpenAPI_smf_registration_modification_t *OpenAPI_smf_registration_modification_p pgw_fqdn = cJSON_GetObjectItemCaseSensitive(smf_registration_modificationJSON, "pgwFqdn"); if (pgw_fqdn) { pgw_fqdn_local_nonprim = OpenAPI_fqdn_rm_parseFromJSON(pgw_fqdn); + if (!pgw_fqdn_local_nonprim) { + ogs_error("OpenAPI_fqdn_rm_parseFromJSON failed [pgw_fqdn]"); + goto end; + } } smf_registration_modification_local_var = OpenAPI_smf_registration_modification_create ( diff --git a/lib/sbi/openapi/model/smf_selection_data.c b/lib/sbi/openapi/model/smf_selection_data.c index e87c3cb93..994994dd0 100644 --- a/lib/sbi/openapi/model/smf_selection_data.c +++ b/lib/sbi/openapi/model/smf_selection_data.c @@ -184,11 +184,19 @@ OpenAPI_smf_selection_data_t *OpenAPI_smf_selection_data_parseFromJSON(cJSON *sm snssai = cJSON_GetObjectItemCaseSensitive(smf_selection_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } mapping_snssai = cJSON_GetObjectItemCaseSensitive(smf_selection_dataJSON, "mappingSnssai"); if (mapping_snssai) { mapping_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapping_snssai); + if (!mapping_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [mapping_snssai]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(smf_selection_dataJSON, "dnn"); diff --git a/lib/sbi/openapi/model/smf_subscription_info.c b/lib/sbi/openapi/model/smf_subscription_info.c index 1d25a51e3..f43e3bc24 100644 --- a/lib/sbi/openapi/model/smf_subscription_info.c +++ b/lib/sbi/openapi/model/smf_subscription_info.c @@ -93,7 +93,6 @@ OpenAPI_smf_subscription_info_t *OpenAPI_smf_subscription_info_parseFromJSON(cJS OpenAPI_smf_subscription_item_t *smf_subscription_listItem = OpenAPI_smf_subscription_item_parseFromJSON(smf_subscription_list_local); if (!smf_subscription_listItem) { ogs_error("No smf_subscription_listItem"); - OpenAPI_list_free(smf_subscription_listList); goto end; } OpenAPI_list_add(smf_subscription_listList, smf_subscription_listItem); diff --git a/lib/sbi/openapi/model/smf_subscription_item.c b/lib/sbi/openapi/model/smf_subscription_item.c index 2d2a7ed8c..e97ee24d2 100644 --- a/lib/sbi/openapi/model/smf_subscription_item.c +++ b/lib/sbi/openapi/model/smf_subscription_item.c @@ -119,6 +119,10 @@ OpenAPI_smf_subscription_item_t *OpenAPI_smf_subscription_item_parseFromJSON(cJS context_info = cJSON_GetObjectItemCaseSensitive(smf_subscription_itemJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } smf_subscription_item_local_var = OpenAPI_smf_subscription_item_create ( diff --git a/lib/sbi/openapi/model/sms_management_subscription_data.c b/lib/sbi/openapi/model/sms_management_subscription_data.c index 7fb4e7bd4..a3268f060 100644 --- a/lib/sbi/openapi/model/sms_management_subscription_data.c +++ b/lib/sbi/openapi/model/sms_management_subscription_data.c @@ -255,6 +255,10 @@ OpenAPI_sms_management_subscription_data_t *OpenAPI_sms_management_subscription_ trace_data = cJSON_GetObjectItemCaseSensitive(sms_management_subscription_dataJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } sms_management_subscription_data_local_var = OpenAPI_sms_management_subscription_data_create ( diff --git a/lib/sbi/openapi/model/sms_management_subscription_data_1.c b/lib/sbi/openapi/model/sms_management_subscription_data_1.c index 073bd4352..fa23dfdc3 100644 --- a/lib/sbi/openapi/model/sms_management_subscription_data_1.c +++ b/lib/sbi/openapi/model/sms_management_subscription_data_1.c @@ -255,6 +255,10 @@ OpenAPI_sms_management_subscription_data_1_t *OpenAPI_sms_management_subscriptio trace_data = cJSON_GetObjectItemCaseSensitive(sms_management_subscription_data_1JSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } sms_management_subscription_data_1_local_var = OpenAPI_sms_management_subscription_data_1_create ( diff --git a/lib/sbi/openapi/model/sms_router_info.c b/lib/sbi/openapi/model/sms_router_info.c index b7ceb0537..bb3959879 100644 --- a/lib/sbi/openapi/model/sms_router_info.c +++ b/lib/sbi/openapi/model/sms_router_info.c @@ -145,6 +145,10 @@ OpenAPI_sms_router_info_t *OpenAPI_sms_router_info_parseFromJSON(cJSON *sms_rout diameter_address = cJSON_GetObjectItemCaseSensitive(sms_router_infoJSON, "diameterAddress"); if (diameter_address) { diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_parseFromJSON(diameter_address); + if (!diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_parseFromJSON failed [diameter_address]"); + goto end; + } } map_address = cJSON_GetObjectItemCaseSensitive(sms_router_infoJSON, "mapAddress"); diff --git a/lib/sbi/openapi/model/smsc_data.c b/lib/sbi/openapi/model/smsc_data.c index af764a297..2f1d9a6dd 100644 --- a/lib/sbi/openapi/model/smsc_data.c +++ b/lib/sbi/openapi/model/smsc_data.c @@ -89,6 +89,10 @@ OpenAPI_smsc_data_t *OpenAPI_smsc_data_parseFromJSON(cJSON *smsc_dataJSON) smsc_diameter_address = cJSON_GetObjectItemCaseSensitive(smsc_dataJSON, "smscDiameterAddress"); if (smsc_diameter_address) { smsc_diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_1_parseFromJSON(smsc_diameter_address); + if (!smsc_diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_1_parseFromJSON failed [smsc_diameter_address]"); + goto end; + } } smsc_data_local_var = OpenAPI_smsc_data_create ( diff --git a/lib/sbi/openapi/model/smsf_info.c b/lib/sbi/openapi/model/smsf_info.c index c41dad9ad..8bc11d70f 100644 --- a/lib/sbi/openapi/model/smsf_info.c +++ b/lib/sbi/openapi/model/smsf_info.c @@ -112,6 +112,10 @@ OpenAPI_smsf_info_t *OpenAPI_smsf_info_parseFromJSON(cJSON *smsf_infoJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } smsf_set_id = cJSON_GetObjectItemCaseSensitive(smsf_infoJSON, "smsfSetId"); if (smsf_set_id) { diff --git a/lib/sbi/openapi/model/smsf_registration.c b/lib/sbi/openapi/model/smsf_registration.c index ec6b7dff4..8d0b3a0c9 100644 --- a/lib/sbi/openapi/model/smsf_registration.c +++ b/lib/sbi/openapi/model/smsf_registration.c @@ -289,6 +289,10 @@ OpenAPI_smsf_registration_t *OpenAPI_smsf_registration_parseFromJSON(cJSON *smsf goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } smsf_map_address = cJSON_GetObjectItemCaseSensitive(smsf_registrationJSON, "smsfMAPAddress"); if (smsf_map_address) { @@ -301,6 +305,10 @@ OpenAPI_smsf_registration_t *OpenAPI_smsf_registration_parseFromJSON(cJSON *smsf smsf_diameter_address = cJSON_GetObjectItemCaseSensitive(smsf_registrationJSON, "smsfDiameterAddress"); if (smsf_diameter_address) { smsf_diameter_address_local_nonprim = OpenAPI_network_node_diameter_address_parseFromJSON(smsf_diameter_address); + if (!smsf_diameter_address_local_nonprim) { + ogs_error("OpenAPI_network_node_diameter_address_parseFromJSON failed [smsf_diameter_address]"); + goto end; + } } registration_time = cJSON_GetObjectItemCaseSensitive(smsf_registrationJSON, "registrationTime"); @@ -314,6 +322,10 @@ OpenAPI_smsf_registration_t *OpenAPI_smsf_registration_parseFromJSON(cJSON *smsf context_info = cJSON_GetObjectItemCaseSensitive(smsf_registrationJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } data_restoration_callback_uri = cJSON_GetObjectItemCaseSensitive(smsf_registrationJSON, "dataRestorationCallbackUri"); diff --git a/lib/sbi/openapi/model/snssai_dnn_pair.c b/lib/sbi/openapi/model/snssai_dnn_pair.c index bbf191cca..f0ed4c507 100644 --- a/lib/sbi/openapi/model/snssai_dnn_pair.c +++ b/lib/sbi/openapi/model/snssai_dnn_pair.c @@ -98,6 +98,10 @@ OpenAPI_snssai_dnn_pair_t *OpenAPI_snssai_dnn_pair_parseFromJSON(cJSON *snssai_d goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } snssai_dnn_pair_local_var = OpenAPI_snssai_dnn_pair_create ( ogs_strdup(dnn->valuestring), diff --git a/lib/sbi/openapi/model/snssai_easdf_info_item.c b/lib/sbi/openapi/model/snssai_easdf_info_item.c index d3a27dba7..a17081362 100644 --- a/lib/sbi/openapi/model/snssai_easdf_info_item.c +++ b/lib/sbi/openapi/model/snssai_easdf_info_item.c @@ -101,6 +101,10 @@ OpenAPI_snssai_easdf_info_item_t *OpenAPI_snssai_easdf_info_item_parseFromJSON(c goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_easdf_info_list = cJSON_GetObjectItemCaseSensitive(snssai_easdf_info_itemJSON, "dnnEasdfInfoList"); if (!dnn_easdf_info_list) { @@ -123,7 +127,6 @@ OpenAPI_snssai_easdf_info_item_t *OpenAPI_snssai_easdf_info_item_parseFromJSON(c OpenAPI_dnn_easdf_info_item_t *dnn_easdf_info_listItem = OpenAPI_dnn_easdf_info_item_parseFromJSON(dnn_easdf_info_list_local); if (!dnn_easdf_info_listItem) { ogs_error("No dnn_easdf_info_listItem"); - OpenAPI_list_free(dnn_easdf_info_listList); goto end; } OpenAPI_list_add(dnn_easdf_info_listList, dnn_easdf_info_listItem); diff --git a/lib/sbi/openapi/model/snssai_extension.c b/lib/sbi/openapi/model/snssai_extension.c index 687f3b6ee..5acf78056 100644 --- a/lib/sbi/openapi/model/snssai_extension.c +++ b/lib/sbi/openapi/model/snssai_extension.c @@ -122,7 +122,6 @@ OpenAPI_snssai_extension_t *OpenAPI_snssai_extension_parseFromJSON(cJSON *snssai OpenAPI_sd_range_t *sd_rangesItem = OpenAPI_sd_range_parseFromJSON(sd_ranges_local); if (!sd_rangesItem) { ogs_error("No sd_rangesItem"); - OpenAPI_list_free(sd_rangesList); goto end; } OpenAPI_list_add(sd_rangesList, sd_rangesItem); diff --git a/lib/sbi/openapi/model/snssai_info.c b/lib/sbi/openapi/model/snssai_info.c index 615d89a5b..390d0e018 100644 --- a/lib/sbi/openapi/model/snssai_info.c +++ b/lib/sbi/openapi/model/snssai_info.c @@ -93,7 +93,6 @@ OpenAPI_snssai_info_t *OpenAPI_snssai_info_parseFromJSON(cJSON *snssai_infoJSON) OpenAPI_dnn_info_t *dnn_infosItem = OpenAPI_dnn_info_parseFromJSON(dnn_infos_local); if (!dnn_infosItem) { ogs_error("No dnn_infosItem"); - OpenAPI_list_free(dnn_infosList); goto end; } OpenAPI_list_add(dnn_infosList, dnn_infosItem); diff --git a/lib/sbi/openapi/model/snssai_info_item.c b/lib/sbi/openapi/model/snssai_info_item.c index 7e503d0d0..087e66f6c 100644 --- a/lib/sbi/openapi/model/snssai_info_item.c +++ b/lib/sbi/openapi/model/snssai_info_item.c @@ -101,6 +101,10 @@ OpenAPI_snssai_info_item_t *OpenAPI_snssai_info_item_parseFromJSON(cJSON *snssai goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_info_list = cJSON_GetObjectItemCaseSensitive(snssai_info_itemJSON, "dnnInfoList"); if (!dnn_info_list) { @@ -123,7 +127,6 @@ OpenAPI_snssai_info_item_t *OpenAPI_snssai_info_item_parseFromJSON(cJSON *snssai OpenAPI_dnn_info_item_t *dnn_info_listItem = OpenAPI_dnn_info_item_parseFromJSON(dnn_info_list_local); if (!dnn_info_listItem) { ogs_error("No dnn_info_listItem"); - OpenAPI_list_free(dnn_info_listList); goto end; } OpenAPI_list_add(dnn_info_listList, dnn_info_listItem); diff --git a/lib/sbi/openapi/model/snssai_mb_smf_info_item.c b/lib/sbi/openapi/model/snssai_mb_smf_info_item.c index e91a721cb..deab01e6f 100644 --- a/lib/sbi/openapi/model/snssai_mb_smf_info_item.c +++ b/lib/sbi/openapi/model/snssai_mb_smf_info_item.c @@ -101,6 +101,10 @@ OpenAPI_snssai_mb_smf_info_item_t *OpenAPI_snssai_mb_smf_info_item_parseFromJSON goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_info_list = cJSON_GetObjectItemCaseSensitive(snssai_mb_smf_info_itemJSON, "dnnInfoList"); if (!dnn_info_list) { @@ -123,7 +127,6 @@ OpenAPI_snssai_mb_smf_info_item_t *OpenAPI_snssai_mb_smf_info_item_parseFromJSON OpenAPI_dnn_mb_smf_info_item_t *dnn_info_listItem = OpenAPI_dnn_mb_smf_info_item_parseFromJSON(dnn_info_list_local); if (!dnn_info_listItem) { ogs_error("No dnn_info_listItem"); - OpenAPI_list_free(dnn_info_listList); goto end; } OpenAPI_list_add(dnn_info_listList, dnn_info_listItem); diff --git a/lib/sbi/openapi/model/snssai_route_selection_descriptor.c b/lib/sbi/openapi/model/snssai_route_selection_descriptor.c index e911dce61..2056db006 100644 --- a/lib/sbi/openapi/model/snssai_route_selection_descriptor.c +++ b/lib/sbi/openapi/model/snssai_route_selection_descriptor.c @@ -99,6 +99,10 @@ OpenAPI_snssai_route_selection_descriptor_t *OpenAPI_snssai_route_selection_desc goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnn_route_sel_descs = cJSON_GetObjectItemCaseSensitive(snssai_route_selection_descriptorJSON, "dnnRouteSelDescs"); if (dnn_route_sel_descs) { @@ -118,7 +122,6 @@ OpenAPI_snssai_route_selection_descriptor_t *OpenAPI_snssai_route_selection_desc OpenAPI_dnn_route_selection_descriptor_t *dnn_route_sel_descsItem = OpenAPI_dnn_route_selection_descriptor_parseFromJSON(dnn_route_sel_descs_local); if (!dnn_route_sel_descsItem) { ogs_error("No dnn_route_sel_descsItem"); - OpenAPI_list_free(dnn_route_sel_descsList); goto end; } OpenAPI_list_add(dnn_route_sel_descsList, dnn_route_sel_descsItem); diff --git a/lib/sbi/openapi/model/snssai_smf_info_item.c b/lib/sbi/openapi/model/snssai_smf_info_item.c index 886aa3f82..855b66156 100644 --- a/lib/sbi/openapi/model/snssai_smf_info_item.c +++ b/lib/sbi/openapi/model/snssai_smf_info_item.c @@ -101,6 +101,10 @@ OpenAPI_snssai_smf_info_item_t *OpenAPI_snssai_smf_info_item_parseFromJSON(cJSON goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_smf_info_list = cJSON_GetObjectItemCaseSensitive(snssai_smf_info_itemJSON, "dnnSmfInfoList"); if (!dnn_smf_info_list) { @@ -123,7 +127,6 @@ OpenAPI_snssai_smf_info_item_t *OpenAPI_snssai_smf_info_item_parseFromJSON(cJSON OpenAPI_dnn_smf_info_item_t *dnn_smf_info_listItem = OpenAPI_dnn_smf_info_item_parseFromJSON(dnn_smf_info_list_local); if (!dnn_smf_info_listItem) { ogs_error("No dnn_smf_info_listItem"); - OpenAPI_list_free(dnn_smf_info_listList); goto end; } OpenAPI_list_add(dnn_smf_info_listList, dnn_smf_info_listItem); diff --git a/lib/sbi/openapi/model/snssai_tsctsf_info_item.c b/lib/sbi/openapi/model/snssai_tsctsf_info_item.c index 4f3a6384b..ea4ec98a1 100644 --- a/lib/sbi/openapi/model/snssai_tsctsf_info_item.c +++ b/lib/sbi/openapi/model/snssai_tsctsf_info_item.c @@ -101,6 +101,10 @@ OpenAPI_snssai_tsctsf_info_item_t *OpenAPI_snssai_tsctsf_info_item_parseFromJSON goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_info_list = cJSON_GetObjectItemCaseSensitive(snssai_tsctsf_info_itemJSON, "dnnInfoList"); if (!dnn_info_list) { @@ -123,7 +127,6 @@ OpenAPI_snssai_tsctsf_info_item_t *OpenAPI_snssai_tsctsf_info_item_parseFromJSON OpenAPI_dnn_tsctsf_info_item_t *dnn_info_listItem = OpenAPI_dnn_tsctsf_info_item_parseFromJSON(dnn_info_list_local); if (!dnn_info_listItem) { ogs_error("No dnn_info_listItem"); - OpenAPI_list_free(dnn_info_listList); goto end; } OpenAPI_list_add(dnn_info_listList, dnn_info_listItem); diff --git a/lib/sbi/openapi/model/snssai_upf_info_item.c b/lib/sbi/openapi/model/snssai_upf_info_item.c index 6038e6cff..c72405716 100644 --- a/lib/sbi/openapi/model/snssai_upf_info_item.c +++ b/lib/sbi/openapi/model/snssai_upf_info_item.c @@ -113,6 +113,10 @@ OpenAPI_snssai_upf_info_item_t *OpenAPI_snssai_upf_info_item_parseFromJSON(cJSON goto end; } s_nssai_local_nonprim = OpenAPI_ext_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_ext_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } dnn_upf_info_list = cJSON_GetObjectItemCaseSensitive(snssai_upf_info_itemJSON, "dnnUpfInfoList"); if (!dnn_upf_info_list) { @@ -135,7 +139,6 @@ OpenAPI_snssai_upf_info_item_t *OpenAPI_snssai_upf_info_item_parseFromJSON(cJSON OpenAPI_dnn_upf_info_item_t *dnn_upf_info_listItem = OpenAPI_dnn_upf_info_item_parseFromJSON(dnn_upf_info_list_local); if (!dnn_upf_info_listItem) { ogs_error("No dnn_upf_info_listItem"); - OpenAPI_list_free(dnn_upf_info_listList); goto end; } OpenAPI_list_add(dnn_upf_info_listList, dnn_upf_info_listItem); diff --git a/lib/sbi/openapi/model/sor_info.c b/lib/sbi/openapi/model/sor_info.c index 306b814b6..0ed944b35 100644 --- a/lib/sbi/openapi/model/sor_info.c +++ b/lib/sbi/openapi/model/sor_info.c @@ -171,6 +171,10 @@ OpenAPI_sor_info_t *OpenAPI_sor_info_parseFromJSON(cJSON *sor_infoJSON) steering_container = cJSON_GetObjectItemCaseSensitive(sor_infoJSON, "steeringContainer"); if (steering_container) { steering_container_local_nonprim = OpenAPI_steering_container_parseFromJSON(steering_container); + if (!steering_container_local_nonprim) { + ogs_error("OpenAPI_steering_container_parseFromJSON failed [steering_container]"); + goto end; + } } ack_ind = cJSON_GetObjectItemCaseSensitive(sor_infoJSON, "ackInd"); diff --git a/lib/sbi/openapi/model/sor_info_1.c b/lib/sbi/openapi/model/sor_info_1.c index b6311b02a..4e4f6409d 100644 --- a/lib/sbi/openapi/model/sor_info_1.c +++ b/lib/sbi/openapi/model/sor_info_1.c @@ -171,6 +171,10 @@ OpenAPI_sor_info_1_t *OpenAPI_sor_info_1_parseFromJSON(cJSON *sor_info_1JSON) steering_container = cJSON_GetObjectItemCaseSensitive(sor_info_1JSON, "steeringContainer"); if (steering_container) { steering_container_local_nonprim = OpenAPI_steering_container_parseFromJSON(steering_container); + if (!steering_container_local_nonprim) { + ogs_error("OpenAPI_steering_container_parseFromJSON failed [steering_container]"); + goto end; + } } ack_ind = cJSON_GetObjectItemCaseSensitive(sor_info_1JSON, "ackInd"); diff --git a/lib/sbi/openapi/model/sor_update_info.c b/lib/sbi/openapi/model/sor_update_info.c index 430cc43ad..39b2e7a54 100644 --- a/lib/sbi/openapi/model/sor_update_info.c +++ b/lib/sbi/openapi/model/sor_update_info.c @@ -86,6 +86,10 @@ OpenAPI_sor_update_info_t *OpenAPI_sor_update_info_parseFromJSON(cJSON *sor_upda goto end; } vplmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(vplmn_id); + if (!vplmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [vplmn_id]"); + goto end; + } supported_features = cJSON_GetObjectItemCaseSensitive(sor_update_infoJSON, "supportedFeatures"); if (supported_features) { diff --git a/lib/sbi/openapi/model/spatial_validity_cond.c b/lib/sbi/openapi/model/spatial_validity_cond.c index 79b2c85fd..c9a4505dd 100644 --- a/lib/sbi/openapi/model/spatial_validity_cond.c +++ b/lib/sbi/openapi/model/spatial_validity_cond.c @@ -134,7 +134,6 @@ OpenAPI_spatial_validity_cond_t *OpenAPI_spatial_validity_cond_parseFromJSON(cJS OpenAPI_tai_t *tracking_area_listItem = OpenAPI_tai_parseFromJSON(tracking_area_list_local); if (!tracking_area_listItem) { ogs_error("No tracking_area_listItem"); - OpenAPI_list_free(tracking_area_listList); goto end; } OpenAPI_list_add(tracking_area_listList, tracking_area_listItem); @@ -165,6 +164,10 @@ OpenAPI_spatial_validity_cond_t *OpenAPI_spatial_validity_cond_parseFromJSON(cJS geographical_service_area = cJSON_GetObjectItemCaseSensitive(spatial_validity_condJSON, "geographicalServiceArea"); if (geographical_service_area) { geographical_service_area_local_nonprim = OpenAPI_geo_service_area_parseFromJSON(geographical_service_area); + if (!geographical_service_area_local_nonprim) { + ogs_error("OpenAPI_geo_service_area_parseFromJSON failed [geographical_service_area]"); + goto end; + } } spatial_validity_cond_local_var = OpenAPI_spatial_validity_cond_create ( diff --git a/lib/sbi/openapi/model/spatial_validity_cond_1.c b/lib/sbi/openapi/model/spatial_validity_cond_1.c index 479a76341..9e13bdbdf 100644 --- a/lib/sbi/openapi/model/spatial_validity_cond_1.c +++ b/lib/sbi/openapi/model/spatial_validity_cond_1.c @@ -134,7 +134,6 @@ OpenAPI_spatial_validity_cond_1_t *OpenAPI_spatial_validity_cond_1_parseFromJSON OpenAPI_tai_1_t *tracking_area_listItem = OpenAPI_tai_1_parseFromJSON(tracking_area_list_local); if (!tracking_area_listItem) { ogs_error("No tracking_area_listItem"); - OpenAPI_list_free(tracking_area_listList); goto end; } OpenAPI_list_add(tracking_area_listList, tracking_area_listItem); @@ -165,6 +164,10 @@ OpenAPI_spatial_validity_cond_1_t *OpenAPI_spatial_validity_cond_1_parseFromJSON geographical_service_area = cJSON_GetObjectItemCaseSensitive(spatial_validity_cond_1JSON, "geographicalServiceArea"); if (geographical_service_area) { geographical_service_area_local_nonprim = OpenAPI_geo_service_area_1_parseFromJSON(geographical_service_area); + if (!geographical_service_area_local_nonprim) { + ogs_error("OpenAPI_geo_service_area_1_parseFromJSON failed [geographical_service_area]"); + goto end; + } } spatial_validity_cond_1_local_var = OpenAPI_spatial_validity_cond_1_create ( diff --git a/lib/sbi/openapi/model/ssm.c b/lib/sbi/openapi/model/ssm.c index a806d72ac..1e1ebb192 100644 --- a/lib/sbi/openapi/model/ssm.c +++ b/lib/sbi/openapi/model/ssm.c @@ -95,6 +95,10 @@ OpenAPI_ssm_t *OpenAPI_ssm_parseFromJSON(cJSON *ssmJSON) goto end; } source_ip_addr_local_nonprim = OpenAPI_ip_addr_parseFromJSON(source_ip_addr); + if (!source_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_addr_parseFromJSON failed [source_ip_addr]"); + goto end; + } dest_ip_addr = cJSON_GetObjectItemCaseSensitive(ssmJSON, "destIpAddr"); if (!dest_ip_addr) { @@ -102,6 +106,10 @@ OpenAPI_ssm_t *OpenAPI_ssm_parseFromJSON(cJSON *ssmJSON) goto end; } dest_ip_addr_local_nonprim = OpenAPI_ip_addr_parseFromJSON(dest_ip_addr); + if (!dest_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_addr_parseFromJSON failed [dest_ip_addr]"); + goto end; + } ssm_local_var = OpenAPI_ssm_create ( source_ip_addr_local_nonprim, diff --git a/lib/sbi/openapi/model/ssm_1.c b/lib/sbi/openapi/model/ssm_1.c index ead6d784b..a5edc2578 100644 --- a/lib/sbi/openapi/model/ssm_1.c +++ b/lib/sbi/openapi/model/ssm_1.c @@ -95,6 +95,10 @@ OpenAPI_ssm_1_t *OpenAPI_ssm_1_parseFromJSON(cJSON *ssm_1JSON) goto end; } source_ip_addr_local_nonprim = OpenAPI_ip_addr_1_parseFromJSON(source_ip_addr); + if (!source_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_addr_1_parseFromJSON failed [source_ip_addr]"); + goto end; + } dest_ip_addr = cJSON_GetObjectItemCaseSensitive(ssm_1JSON, "destIpAddr"); if (!dest_ip_addr) { @@ -102,6 +106,10 @@ OpenAPI_ssm_1_t *OpenAPI_ssm_1_parseFromJSON(cJSON *ssm_1JSON) goto end; } dest_ip_addr_local_nonprim = OpenAPI_ip_addr_1_parseFromJSON(dest_ip_addr); + if (!dest_ip_addr_local_nonprim) { + ogs_error("OpenAPI_ip_addr_1_parseFromJSON failed [dest_ip_addr]"); + goto end; + } ssm_1_local_var = OpenAPI_ssm_1_create ( source_ip_addr_local_nonprim, diff --git a/lib/sbi/openapi/model/status_info.c b/lib/sbi/openapi/model/status_info.c index ef60920c0..1be8dfc93 100644 --- a/lib/sbi/openapi/model/status_info.c +++ b/lib/sbi/openapi/model/status_info.c @@ -122,6 +122,10 @@ OpenAPI_status_info_t *OpenAPI_status_info_parseFromJSON(cJSON *status_infoJSON) cn_assisted_ran_para = cJSON_GetObjectItemCaseSensitive(status_infoJSON, "cnAssistedRanPara"); if (cn_assisted_ran_para) { cn_assisted_ran_para_local_nonprim = OpenAPI_cn_assisted_ran_para_parseFromJSON(cn_assisted_ran_para); + if (!cn_assisted_ran_para_local_nonprim) { + ogs_error("OpenAPI_cn_assisted_ran_para_parseFromJSON failed [cn_assisted_ran_para]"); + goto end; + } } an_type = cJSON_GetObjectItemCaseSensitive(status_infoJSON, "anType"); diff --git a/lib/sbi/openapi/model/status_notification.c b/lib/sbi/openapi/model/status_notification.c index 141e2682f..9d5474bd2 100644 --- a/lib/sbi/openapi/model/status_notification.c +++ b/lib/sbi/openapi/model/status_notification.c @@ -212,20 +212,36 @@ OpenAPI_status_notification_t *OpenAPI_status_notification_parseFromJSON(cJSON * goto end; } status_info_local_nonprim = OpenAPI_status_info_parseFromJSON(status_info); + if (!status_info_local_nonprim) { + ogs_error("OpenAPI_status_info_parseFromJSON failed [status_info]"); + goto end; + } small_data_rate_status = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "smallDataRateStatus"); if (small_data_rate_status) { small_data_rate_status_local_nonprim = OpenAPI_small_data_rate_status_parseFromJSON(small_data_rate_status); + if (!small_data_rate_status_local_nonprim) { + ogs_error("OpenAPI_small_data_rate_status_parseFromJSON failed [small_data_rate_status]"); + goto end; + } } apn_rate_status = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "apnRateStatus"); if (apn_rate_status) { apn_rate_status_local_nonprim = OpenAPI_apn_rate_status_parseFromJSON(apn_rate_status); + if (!apn_rate_status_local_nonprim) { + ogs_error("OpenAPI_apn_rate_status_parseFromJSON failed [apn_rate_status]"); + goto end; + } } target_dnai_info = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "targetDnaiInfo"); if (target_dnai_info) { target_dnai_info_local_nonprim = OpenAPI_target_dnai_info_parseFromJSON(target_dnai_info); + if (!target_dnai_info_local_nonprim) { + ogs_error("OpenAPI_target_dnai_info_parseFromJSON failed [target_dnai_info]"); + goto end; + } } old_pdu_session_ref = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "oldPduSessionRef"); @@ -247,6 +263,10 @@ OpenAPI_status_notification_t *OpenAPI_status_notification_parseFromJSON(cJSON * eps_pdn_cnx_info = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "epsPdnCnxInfo"); if (eps_pdn_cnx_info) { eps_pdn_cnx_info_local_nonprim = OpenAPI_eps_pdn_cnx_info_parseFromJSON(eps_pdn_cnx_info); + if (!eps_pdn_cnx_info_local_nonprim) { + ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON failed [eps_pdn_cnx_info]"); + goto end; + } } inter_plmn_api_root = cJSON_GetObjectItemCaseSensitive(status_notificationJSON, "interPlmnApiRoot"); diff --git a/lib/sbi/openapi/model/steering_info.c b/lib/sbi/openapi/model/steering_info.c index 2b88268b0..549392771 100644 --- a/lib/sbi/openapi/model/steering_info.c +++ b/lib/sbi/openapi/model/steering_info.c @@ -99,6 +99,10 @@ OpenAPI_steering_info_t *OpenAPI_steering_info_parseFromJSON(cJSON *steering_inf goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } access_tech_list = cJSON_GetObjectItemCaseSensitive(steering_infoJSON, "accessTechList"); if (access_tech_list) { @@ -118,7 +122,6 @@ OpenAPI_steering_info_t *OpenAPI_steering_info_parseFromJSON(cJSON *steering_inf OpenAPI_access_tech_t *access_tech_listItem = OpenAPI_access_tech_parseFromJSON(access_tech_list_local); if (!access_tech_listItem) { ogs_error("No access_tech_listItem"); - OpenAPI_list_free(access_tech_listList); goto end; } OpenAPI_list_add(access_tech_listList, access_tech_listItem); diff --git a/lib/sbi/openapi/model/steering_mode.c b/lib/sbi/openapi/model/steering_mode.c index 6e06aad9e..b05b194c7 100644 --- a/lib/sbi/openapi/model/steering_mode.c +++ b/lib/sbi/openapi/model/steering_mode.c @@ -166,6 +166,10 @@ OpenAPI_steering_mode_t *OpenAPI_steering_mode_parseFromJSON(cJSON *steering_mod standby = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "standby"); if (standby) { standby_local_nonprim = OpenAPI_access_type_rm_parseFromJSON(standby); + if (!standby_local_nonprim) { + ogs_error("OpenAPI_access_type_rm_parseFromJSON failed [standby]"); + goto end; + } } _3g_load = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "3gLoad"); @@ -188,6 +192,10 @@ OpenAPI_steering_mode_t *OpenAPI_steering_mode_parseFromJSON(cJSON *steering_mod thres_value = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "thresValue"); if (thres_value) { thres_value_local_nonprim = OpenAPI_threshold_value_parseFromJSON(thres_value); + if (!thres_value_local_nonprim) { + ogs_error("OpenAPI_threshold_value_parseFromJSON failed [thres_value]"); + goto end; + } } steer_mode_ind = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "steerModeInd"); diff --git a/lib/sbi/openapi/model/stored_search_result.c b/lib/sbi/openapi/model/stored_search_result.c index 4aba0d4b6..0ac6ac8f3 100644 --- a/lib/sbi/openapi/model/stored_search_result.c +++ b/lib/sbi/openapi/model/stored_search_result.c @@ -93,7 +93,6 @@ OpenAPI_stored_search_result_t *OpenAPI_stored_search_result_parseFromJSON(cJSON OpenAPI_nf_profile_t *nf_instancesItem = OpenAPI_nf_profile_parseFromJSON(nf_instances_local); if (!nf_instancesItem) { ogs_error("No nf_instancesItem"); - OpenAPI_list_free(nf_instancesList); goto end; } OpenAPI_list_add(nf_instancesList, nf_instancesItem); diff --git a/lib/sbi/openapi/model/subscr_cond.c b/lib/sbi/openapi/model/subscr_cond.c index d641fb351..95c46b841 100644 --- a/lib/sbi/openapi/model/subscr_cond.c +++ b/lib/sbi/openapi/model/subscr_cond.c @@ -434,7 +434,6 @@ OpenAPI_subscr_cond_t *OpenAPI_subscr_cond_parseFromJSON(cJSON *subscr_condJSON) OpenAPI_guami_t *guami_listItem = OpenAPI_guami_parseFromJSON(guami_list_local); if (!guami_listItem) { ogs_error("No guami_listItem"); - OpenAPI_list_free(guami_listList); goto end; } OpenAPI_list_add(guami_listList, guami_listItem); @@ -459,7 +458,6 @@ OpenAPI_subscr_cond_t *OpenAPI_subscr_cond_parseFromJSON(cJSON *subscr_condJSON) OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); @@ -550,7 +548,6 @@ OpenAPI_subscr_cond_t *OpenAPI_subscr_cond_parseFromJSON(cJSON *subscr_condJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); diff --git a/lib/sbi/openapi/model/subscribed_default_qos.c b/lib/sbi/openapi/model/subscribed_default_qos.c index 55d69da3e..2a447902b 100644 --- a/lib/sbi/openapi/model/subscribed_default_qos.c +++ b/lib/sbi/openapi/model/subscribed_default_qos.c @@ -102,6 +102,10 @@ OpenAPI_subscribed_default_qos_t *OpenAPI_subscribed_default_qos_parseFromJSON(c goto end; } arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } priority_level = cJSON_GetObjectItemCaseSensitive(subscribed_default_qosJSON, "priorityLevel"); if (priority_level) { diff --git a/lib/sbi/openapi/model/subscribed_default_qos_1.c b/lib/sbi/openapi/model/subscribed_default_qos_1.c index 9402ab8b8..e2aed8788 100644 --- a/lib/sbi/openapi/model/subscribed_default_qos_1.c +++ b/lib/sbi/openapi/model/subscribed_default_qos_1.c @@ -102,6 +102,10 @@ OpenAPI_subscribed_default_qos_1_t *OpenAPI_subscribed_default_qos_1_parseFromJS goto end; } arp_local_nonprim = OpenAPI_arp_1_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_1_parseFromJSON failed [arp]"); + goto end; + } priority_level = cJSON_GetObjectItemCaseSensitive(subscribed_default_qos_1JSON, "priorityLevel"); if (priority_level) { diff --git a/lib/sbi/openapi/model/subscribed_snssai.c b/lib/sbi/openapi/model/subscribed_snssai.c index 39b61d5f5..fa92b5412 100644 --- a/lib/sbi/openapi/model/subscribed_snssai.c +++ b/lib/sbi/openapi/model/subscribed_snssai.c @@ -109,6 +109,10 @@ OpenAPI_subscribed_snssai_t *OpenAPI_subscribed_snssai_parseFromJSON(cJSON *subs goto end; } subscribed_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(subscribed_snssai); + if (!subscribed_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [subscribed_snssai]"); + goto end; + } default_indication = cJSON_GetObjectItemCaseSensitive(subscribed_snssaiJSON, "defaultIndication"); if (default_indication) { diff --git a/lib/sbi/openapi/model/subscription_context.c b/lib/sbi/openapi/model/subscription_context.c index e87b1e052..6700c1898 100644 --- a/lib/sbi/openapi/model/subscription_context.c +++ b/lib/sbi/openapi/model/subscription_context.c @@ -93,6 +93,10 @@ OpenAPI_subscription_context_t *OpenAPI_subscription_context_parseFromJSON(cJSON subscr_cond = cJSON_GetObjectItemCaseSensitive(subscription_contextJSON, "subscrCond"); if (subscr_cond) { subscr_cond_local_nonprim = OpenAPI_subscr_cond_parseFromJSON(subscr_cond); + if (!subscr_cond_local_nonprim) { + ogs_error("OpenAPI_subscr_cond_parseFromJSON failed [subscr_cond]"); + goto end; + } } subscription_context_local_var = OpenAPI_subscription_context_create ( diff --git a/lib/sbi/openapi/model/subscription_data.c b/lib/sbi/openapi/model/subscription_data.c index 55abcd5a2..221cd98f5 100644 --- a/lib/sbi/openapi/model/subscription_data.c +++ b/lib/sbi/openapi/model/subscription_data.c @@ -461,6 +461,10 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs subscr_cond = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "subscrCond"); if (subscr_cond) { subscr_cond_local_nonprim = OpenAPI_subscr_cond_parseFromJSON(subscr_cond); + if (!subscr_cond_local_nonprim) { + ogs_error("OpenAPI_subscr_cond_parseFromJSON failed [subscr_cond]"); + goto end; + } } subscription_id = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "subscriptionId"); @@ -501,6 +505,10 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs plmn_id = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } nid = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "nid"); @@ -514,6 +522,10 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs notif_condition = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "notifCondition"); if (notif_condition) { notif_condition_local_nonprim = OpenAPI_notif_condition_parseFromJSON(notif_condition); + if (!notif_condition_local_nonprim) { + ogs_error("OpenAPI_notif_condition_parseFromJSON failed [notif_condition]"); + goto end; + } } req_nf_type = cJSON_GetObjectItemCaseSensitive(subscription_dataJSON, "reqNfType"); @@ -551,7 +563,6 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs OpenAPI_ext_snssai_t *req_snssaisItem = OpenAPI_ext_snssai_parseFromJSON(req_snssais_local); if (!req_snssaisItem) { ogs_error("No req_snssaisItem"); - OpenAPI_list_free(req_snssaisList); goto end; } OpenAPI_list_add(req_snssaisList, req_snssaisItem); @@ -576,7 +587,6 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs OpenAPI_plmn_snssai_t *req_per_plmn_snssaisItem = OpenAPI_plmn_snssai_parseFromJSON(req_per_plmn_snssais_local); if (!req_per_plmn_snssaisItem) { ogs_error("No req_per_plmn_snssaisItem"); - OpenAPI_list_free(req_per_plmn_snssaisList); goto end; } OpenAPI_list_add(req_per_plmn_snssaisList, req_per_plmn_snssaisItem); @@ -601,7 +611,6 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs OpenAPI_plmn_id_t *req_plmn_listItem = OpenAPI_plmn_id_parseFromJSON(req_plmn_list_local); if (!req_plmn_listItem) { ogs_error("No req_plmn_listItem"); - OpenAPI_list_free(req_plmn_listList); goto end; } OpenAPI_list_add(req_plmn_listList, req_plmn_listItem); @@ -626,7 +635,6 @@ OpenAPI_subscription_data_t *OpenAPI_subscription_data_parseFromJSON(cJSON *subs OpenAPI_plmn_id_nid_t *req_snpn_listItem = OpenAPI_plmn_id_nid_parseFromJSON(req_snpn_list_local); if (!req_snpn_listItem) { ogs_error("No req_snpn_listItem"); - OpenAPI_list_free(req_snpn_listList); goto end; } OpenAPI_list_add(req_snpn_listList, req_snpn_listItem); diff --git a/lib/sbi/openapi/model/subscription_data_sets.c b/lib/sbi/openapi/model/subscription_data_sets.c index e8850963e..e4e8b4127 100644 --- a/lib/sbi/openapi/model/subscription_data_sets.c +++ b/lib/sbi/openapi/model/subscription_data_sets.c @@ -382,81 +382,145 @@ OpenAPI_subscription_data_sets_t *OpenAPI_subscription_data_sets_parseFromJSON(c am_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "amData"); if (am_data) { am_data_local_nonprim = OpenAPI_access_and_mobility_subscription_data_parseFromJSON(am_data); + if (!am_data_local_nonprim) { + ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON failed [am_data]"); + goto end; + } } smf_sel_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "smfSelData"); if (smf_sel_data) { smf_sel_data_local_nonprim = OpenAPI_smf_selection_subscription_data_parseFromJSON(smf_sel_data); + if (!smf_sel_data_local_nonprim) { + ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON failed [smf_sel_data]"); + goto end; + } } uec_amf_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "uecAmfData"); if (uec_amf_data) { uec_amf_data_local_nonprim = OpenAPI_ue_context_in_amf_data_parseFromJSON(uec_amf_data); + if (!uec_amf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_amf_data_parseFromJSON failed [uec_amf_data]"); + goto end; + } } uec_smf_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "uecSmfData"); if (uec_smf_data) { uec_smf_data_local_nonprim = OpenAPI_ue_context_in_smf_data_parseFromJSON(uec_smf_data); + if (!uec_smf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smf_data_parseFromJSON failed [uec_smf_data]"); + goto end; + } } uec_smsf_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "uecSmsfData"); if (uec_smsf_data) { uec_smsf_data_local_nonprim = OpenAPI_ue_context_in_smsf_data_parseFromJSON(uec_smsf_data); + if (!uec_smsf_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_in_smsf_data_parseFromJSON failed [uec_smsf_data]"); + goto end; + } } sms_subs_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "smsSubsData"); if (sms_subs_data) { sms_subs_data_local_nonprim = OpenAPI_sms_subscription_data_parseFromJSON(sms_subs_data); + if (!sms_subs_data_local_nonprim) { + ogs_error("OpenAPI_sms_subscription_data_parseFromJSON failed [sms_subs_data]"); + goto end; + } } sm_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "smData"); if (sm_data) { sm_data_local_nonprim = OpenAPI_sm_subs_data_parseFromJSON(sm_data); + if (!sm_data_local_nonprim) { + ogs_error("OpenAPI_sm_subs_data_parseFromJSON failed [sm_data]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } sms_mng_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "smsMngData"); if (sms_mng_data) { sms_mng_data_local_nonprim = OpenAPI_sms_management_subscription_data_parseFromJSON(sms_mng_data); + if (!sms_mng_data_local_nonprim) { + ogs_error("OpenAPI_sms_management_subscription_data_parseFromJSON failed [sms_mng_data]"); + goto end; + } } lcs_privacy_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "lcsPrivacyData"); if (lcs_privacy_data) { lcs_privacy_data_local_nonprim = OpenAPI_lcs_privacy_data_parseFromJSON(lcs_privacy_data); + if (!lcs_privacy_data_local_nonprim) { + ogs_error("OpenAPI_lcs_privacy_data_parseFromJSON failed [lcs_privacy_data]"); + goto end; + } } lcs_mo_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "lcsMoData"); if (lcs_mo_data) { lcs_mo_data_local_nonprim = OpenAPI_lcs_mo_data_parseFromJSON(lcs_mo_data); + if (!lcs_mo_data_local_nonprim) { + ogs_error("OpenAPI_lcs_mo_data_parseFromJSON failed [lcs_mo_data]"); + goto end; + } } v2x_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "v2xData"); if (v2x_data) { v2x_data_local_nonprim = OpenAPI_v2x_subscription_data_parseFromJSON(v2x_data); + if (!v2x_data_local_nonprim) { + ogs_error("OpenAPI_v2x_subscription_data_parseFromJSON failed [v2x_data]"); + goto end; + } } lcs_broadcast_assistance_types_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "lcsBroadcastAssistanceTypesData"); if (lcs_broadcast_assistance_types_data) { lcs_broadcast_assistance_types_data_local_nonprim = OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON(lcs_broadcast_assistance_types_data); + if (!lcs_broadcast_assistance_types_data_local_nonprim) { + ogs_error("OpenAPI_lcs_broadcast_assistance_types_data_parseFromJSON failed [lcs_broadcast_assistance_types_data]"); + goto end; + } } prose_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "proseData"); if (prose_data) { prose_data_local_nonprim = OpenAPI_prose_subscription_data_parseFromJSON(prose_data); + if (!prose_data_local_nonprim) { + ogs_error("OpenAPI_prose_subscription_data_parseFromJSON failed [prose_data]"); + goto end; + } } mbs_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "mbsData"); if (mbs_data) { mbs_data_local_nonprim = OpenAPI_mbs_subscription_data_parseFromJSON(mbs_data); + if (!mbs_data_local_nonprim) { + ogs_error("OpenAPI_mbs_subscription_data_parseFromJSON failed [mbs_data]"); + goto end; + } } uc_data = cJSON_GetObjectItemCaseSensitive(subscription_data_setsJSON, "ucData"); if (uc_data) { uc_data_local_nonprim = OpenAPI_uc_subscription_data_parseFromJSON(uc_data); + if (!uc_data_local_nonprim) { + ogs_error("OpenAPI_uc_subscription_data_parseFromJSON failed [uc_data]"); + goto end; + } } subscription_data_sets_local_var = OpenAPI_subscription_data_sets_create ( diff --git a/lib/sbi/openapi/model/subscription_data_subscriptions.c b/lib/sbi/openapi/model/subscription_data_subscriptions.c index fcdbd0734..95affe832 100644 --- a/lib/sbi/openapi/model/subscription_data_subscriptions.c +++ b/lib/sbi/openapi/model/subscription_data_subscriptions.c @@ -270,11 +270,19 @@ OpenAPI_subscription_data_subscriptions_t *OpenAPI_subscription_data_subscriptio sdm_subscription = cJSON_GetObjectItemCaseSensitive(subscription_data_subscriptionsJSON, "sdmSubscription"); if (sdm_subscription) { sdm_subscription_local_nonprim = OpenAPI_sdm_subscription_1_parseFromJSON(sdm_subscription); + if (!sdm_subscription_local_nonprim) { + ogs_error("OpenAPI_sdm_subscription_1_parseFromJSON failed [sdm_subscription]"); + goto end; + } } hss_subscription_info = cJSON_GetObjectItemCaseSensitive(subscription_data_subscriptionsJSON, "hssSubscriptionInfo"); if (hss_subscription_info) { hss_subscription_info_local_nonprim = OpenAPI_hss_subscription_info_parseFromJSON(hss_subscription_info); + if (!hss_subscription_info_local_nonprim) { + ogs_error("OpenAPI_hss_subscription_info_parseFromJSON failed [hss_subscription_info]"); + goto end; + } } subscription_id = cJSON_GetObjectItemCaseSensitive(subscription_data_subscriptionsJSON, "subscriptionId"); diff --git a/lib/sbi/openapi/model/tai.c b/lib/sbi/openapi/model/tai.c index 008347af7..3d05289cf 100644 --- a/lib/sbi/openapi/model/tai.c +++ b/lib/sbi/openapi/model/tai.c @@ -102,6 +102,10 @@ OpenAPI_tai_t *OpenAPI_tai_parseFromJSON(cJSON *taiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } tac = cJSON_GetObjectItemCaseSensitive(taiJSON, "tac"); if (!tac) { diff --git a/lib/sbi/openapi/model/tai_1.c b/lib/sbi/openapi/model/tai_1.c index b1d403bb8..8b542b1e3 100644 --- a/lib/sbi/openapi/model/tai_1.c +++ b/lib/sbi/openapi/model/tai_1.c @@ -102,6 +102,10 @@ OpenAPI_tai_1_t *OpenAPI_tai_1_parseFromJSON(cJSON *tai_1JSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } tac = cJSON_GetObjectItemCaseSensitive(tai_1JSON, "tac"); if (!tac) { diff --git a/lib/sbi/openapi/model/tai_range.c b/lib/sbi/openapi/model/tai_range.c index 7a465d47a..467141720 100644 --- a/lib/sbi/openapi/model/tai_range.c +++ b/lib/sbi/openapi/model/tai_range.c @@ -115,6 +115,10 @@ OpenAPI_tai_range_t *OpenAPI_tai_range_parseFromJSON(cJSON *tai_rangeJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } tac_range_list = cJSON_GetObjectItemCaseSensitive(tai_rangeJSON, "tacRangeList"); if (!tac_range_list) { @@ -137,7 +141,6 @@ OpenAPI_tai_range_t *OpenAPI_tai_range_parseFromJSON(cJSON *tai_rangeJSON) OpenAPI_tac_range_t *tac_range_listItem = OpenAPI_tac_range_parseFromJSON(tac_range_list_local); if (!tac_range_listItem) { ogs_error("No tac_range_listItem"); - OpenAPI_list_free(tac_range_listList); goto end; } OpenAPI_list_add(tac_range_listList, tac_range_listItem); diff --git a/lib/sbi/openapi/model/target_area.c b/lib/sbi/openapi/model/target_area.c index 3780f2dbd..61ff30313 100644 --- a/lib/sbi/openapi/model/target_area.c +++ b/lib/sbi/openapi/model/target_area.c @@ -127,7 +127,6 @@ OpenAPI_target_area_t *OpenAPI_target_area_parseFromJSON(cJSON *target_areaJSON) OpenAPI_tai_t *ta_listItem = OpenAPI_tai_parseFromJSON(ta_list_local); if (!ta_listItem) { ogs_error("No ta_listItem"); - OpenAPI_list_free(ta_listList); goto end; } OpenAPI_list_add(ta_listList, ta_listItem); @@ -152,7 +151,6 @@ OpenAPI_target_area_t *OpenAPI_target_area_parseFromJSON(cJSON *target_areaJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); diff --git a/lib/sbi/openapi/model/time_period.c b/lib/sbi/openapi/model/time_period.c index 8a39e60ae..1caa01633 100644 --- a/lib/sbi/openapi/model/time_period.c +++ b/lib/sbi/openapi/model/time_period.c @@ -84,6 +84,10 @@ OpenAPI_time_period_t *OpenAPI_time_period_parseFromJSON(cJSON *time_periodJSON) goto end; } period_local_nonprim = OpenAPI_periodicity_parseFromJSON(period); + if (!period_local_nonprim) { + ogs_error("OpenAPI_periodicity_parseFromJSON failed [period]"); + goto end; + } max_num_period = cJSON_GetObjectItemCaseSensitive(time_periodJSON, "maxNumPeriod"); if (max_num_period) { diff --git a/lib/sbi/openapi/model/tmgi.c b/lib/sbi/openapi/model/tmgi.c index 8386d29b4..c335158b3 100644 --- a/lib/sbi/openapi/model/tmgi.c +++ b/lib/sbi/openapi/model/tmgi.c @@ -98,6 +98,10 @@ OpenAPI_tmgi_t *OpenAPI_tmgi_parseFromJSON(cJSON *tmgiJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } tmgi_local_var = OpenAPI_tmgi_create ( ogs_strdup(mbs_service_id->valuestring), diff --git a/lib/sbi/openapi/model/tmgi_1.c b/lib/sbi/openapi/model/tmgi_1.c index 941b3a571..d6cd2821e 100644 --- a/lib/sbi/openapi/model/tmgi_1.c +++ b/lib/sbi/openapi/model/tmgi_1.c @@ -98,6 +98,10 @@ OpenAPI_tmgi_1_t *OpenAPI_tmgi_1_parseFromJSON(cJSON *tmgi_1JSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_1_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_1_parseFromJSON failed [plmn_id]"); + goto end; + } tmgi_1_local_var = OpenAPI_tmgi_1_create ( ogs_strdup(mbs_service_id->valuestring), diff --git a/lib/sbi/openapi/model/tmgi_range.c b/lib/sbi/openapi/model/tmgi_range.c index e608e6f1f..a5cc71bb7 100644 --- a/lib/sbi/openapi/model/tmgi_range.c +++ b/lib/sbi/openapi/model/tmgi_range.c @@ -138,6 +138,10 @@ OpenAPI_tmgi_range_t *OpenAPI_tmgi_range_parseFromJSON(cJSON *tmgi_rangeJSON) goto end; } plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } nid = cJSON_GetObjectItemCaseSensitive(tmgi_rangeJSON, "nid"); if (nid) { diff --git a/lib/sbi/openapi/model/top_application.c b/lib/sbi/openapi/model/top_application.c index 5106c0608..06793f6a6 100644 --- a/lib/sbi/openapi/model/top_application.c +++ b/lib/sbi/openapi/model/top_application.c @@ -101,6 +101,10 @@ OpenAPI_top_application_t *OpenAPI_top_application_parseFromJSON(cJSON *top_appl ip_traffic_filter = cJSON_GetObjectItemCaseSensitive(top_applicationJSON, "ipTrafficFilter"); if (ip_traffic_filter) { ip_traffic_filter_local_nonprim = OpenAPI_flow_info_parseFromJSON(ip_traffic_filter); + if (!ip_traffic_filter_local_nonprim) { + ogs_error("OpenAPI_flow_info_parseFromJSON failed [ip_traffic_filter]"); + goto end; + } } ratio = cJSON_GetObjectItemCaseSensitive(top_applicationJSON, "ratio"); diff --git a/lib/sbi/openapi/model/trace_data_response.c b/lib/sbi/openapi/model/trace_data_response.c index afdc6b5ed..f7c02e639 100644 --- a/lib/sbi/openapi/model/trace_data_response.c +++ b/lib/sbi/openapi/model/trace_data_response.c @@ -81,6 +81,10 @@ OpenAPI_trace_data_response_t *OpenAPI_trace_data_response_parseFromJSON(cJSON * trace_data = cJSON_GetObjectItemCaseSensitive(trace_data_responseJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } shared_trace_data_id = cJSON_GetObjectItemCaseSensitive(trace_data_responseJSON, "sharedTraceDataId"); diff --git a/lib/sbi/openapi/model/traffic_characterization.c b/lib/sbi/openapi/model/traffic_characterization.c index c9f180cf8..96e63a69a 100644 --- a/lib/sbi/openapi/model/traffic_characterization.c +++ b/lib/sbi/openapi/model/traffic_characterization.c @@ -178,6 +178,10 @@ OpenAPI_traffic_characterization_t *OpenAPI_traffic_characterization_parseFromJS snssai = cJSON_GetObjectItemCaseSensitive(traffic_characterizationJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } app_id = cJSON_GetObjectItemCaseSensitive(traffic_characterizationJSON, "appId"); @@ -206,7 +210,6 @@ OpenAPI_traffic_characterization_t *OpenAPI_traffic_characterization_parseFromJS OpenAPI_ip_eth_flow_description_t *f_descsItem = OpenAPI_ip_eth_flow_description_parseFromJSON(f_descs_local); if (!f_descsItem) { ogs_error("No f_descsItem"); - OpenAPI_list_free(f_descsList); goto end; } OpenAPI_list_add(f_descsList, f_descsItem); diff --git a/lib/sbi/openapi/model/traffic_control_data.c b/lib/sbi/openapi/model/traffic_control_data.c index cc44a3136..d1cf8fe27 100644 --- a/lib/sbi/openapi/model/traffic_control_data.c +++ b/lib/sbi/openapi/model/traffic_control_data.c @@ -367,6 +367,10 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON redirect_info = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "redirectInfo"); if (redirect_info) { redirect_info_local_nonprim = OpenAPI_redirect_information_parseFromJSON(redirect_info); + if (!redirect_info_local_nonprim) { + ogs_error("OpenAPI_redirect_information_parseFromJSON failed [redirect_info]"); + goto end; + } } add_redirect_info = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "addRedirectInfo"); @@ -387,7 +391,6 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON OpenAPI_redirect_information_t *add_redirect_infoItem = OpenAPI_redirect_information_parseFromJSON(add_redirect_info_local); if (!add_redirect_infoItem) { ogs_error("No add_redirect_infoItem"); - OpenAPI_list_free(add_redirect_infoList); goto end; } OpenAPI_list_add(add_redirect_infoList, add_redirect_infoItem); @@ -436,7 +439,6 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON OpenAPI_route_to_location_t *route_to_locsItem = OpenAPI_route_to_location_parseFromJSON(route_to_locs_local); if (!route_to_locsItem) { ogs_error("No route_to_locsItem"); - OpenAPI_list_free(route_to_locsList); goto end; } OpenAPI_list_add(route_to_locsList, route_to_locsItem); @@ -469,7 +471,6 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON OpenAPI_eas_ip_replacement_info_t *eas_ip_replace_infosItem = OpenAPI_eas_ip_replacement_info_parseFromJSON(eas_ip_replace_infos_local); if (!eas_ip_replace_infosItem) { ogs_error("No eas_ip_replace_infosItem"); - OpenAPI_list_free(eas_ip_replace_infosList); goto end; } OpenAPI_list_add(eas_ip_replace_infosList, eas_ip_replace_infosItem); @@ -503,6 +504,10 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON up_path_chg_event = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "upPathChgEvent"); if (up_path_chg_event) { up_path_chg_event_local_nonprim = OpenAPI_up_path_chg_event_parseFromJSON(up_path_chg_event); + if (!up_path_chg_event_local_nonprim) { + ogs_error("OpenAPI_up_path_chg_event_parseFromJSON failed [up_path_chg_event]"); + goto end; + } } steer_fun = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "steerFun"); @@ -517,11 +522,19 @@ OpenAPI_traffic_control_data_t *OpenAPI_traffic_control_data_parseFromJSON(cJSON steer_mode_dl = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "steerModeDl"); if (steer_mode_dl) { steer_mode_dl_local_nonprim = OpenAPI_steering_mode_parseFromJSON(steer_mode_dl); + if (!steer_mode_dl_local_nonprim) { + ogs_error("OpenAPI_steering_mode_parseFromJSON failed [steer_mode_dl]"); + goto end; + } } steer_mode_ul = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "steerModeUl"); if (steer_mode_ul) { steer_mode_ul_local_nonprim = OpenAPI_steering_mode_parseFromJSON(steer_mode_ul); + if (!steer_mode_ul_local_nonprim) { + ogs_error("OpenAPI_steering_mode_parseFromJSON failed [steer_mode_ul]"); + goto end; + } } mul_acc_ctrl = cJSON_GetObjectItemCaseSensitive(traffic_control_dataJSON, "mulAccCtrl"); diff --git a/lib/sbi/openapi/model/traffic_descriptor.c b/lib/sbi/openapi/model/traffic_descriptor.c index 9047b89ca..8ef48b8bf 100644 --- a/lib/sbi/openapi/model/traffic_descriptor.c +++ b/lib/sbi/openapi/model/traffic_descriptor.c @@ -116,6 +116,10 @@ OpenAPI_traffic_descriptor_t *OpenAPI_traffic_descriptor_parseFromJSON(cJSON *tr s_nssai = cJSON_GetObjectItemCaseSensitive(traffic_descriptorJSON, "sNssai"); if (s_nssai) { s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai); + if (!s_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [s_nssai]"); + goto end; + } } ddd_traffic_descriptor_list = cJSON_GetObjectItemCaseSensitive(traffic_descriptorJSON, "dddTrafficDescriptorList"); @@ -136,7 +140,6 @@ OpenAPI_traffic_descriptor_t *OpenAPI_traffic_descriptor_parseFromJSON(cJSON *tr OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local); if (!ddd_traffic_descriptor_listItem) { ogs_error("No ddd_traffic_descriptor_listItem"); - OpenAPI_list_free(ddd_traffic_descriptor_listList); goto end; } OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem); diff --git a/lib/sbi/openapi/model/traffic_descriptor_components.c b/lib/sbi/openapi/model/traffic_descriptor_components.c index 9d0c3e519..478cbdb8a 100644 --- a/lib/sbi/openapi/model/traffic_descriptor_components.c +++ b/lib/sbi/openapi/model/traffic_descriptor_components.c @@ -294,7 +294,6 @@ OpenAPI_traffic_descriptor_components_t *OpenAPI_traffic_descriptor_components_p OpenAPI_eth_flow_description_t *eth_flow_descsItem = OpenAPI_eth_flow_description_parseFromJSON(eth_flow_descs_local); if (!eth_flow_descsItem) { ogs_error("No eth_flow_descsItem"); - OpenAPI_list_free(eth_flow_descsList); goto end; } OpenAPI_list_add(eth_flow_descsList, eth_flow_descsItem); @@ -340,7 +339,6 @@ OpenAPI_traffic_descriptor_components_t *OpenAPI_traffic_descriptor_components_p OpenAPI_connection_capabilities_t *conn_capsItem = OpenAPI_connection_capabilities_parseFromJSON(conn_caps_local); if (!conn_capsItem) { ogs_error("No conn_capsItem"); - OpenAPI_list_free(conn_capsList); goto end; } OpenAPI_list_add(conn_capsList, conn_capsItem); diff --git a/lib/sbi/openapi/model/traffic_influ_data.c b/lib/sbi/openapi/model/traffic_influ_data.c index b6ced012f..6b16f13f1 100644 --- a/lib/sbi/openapi/model/traffic_influ_data.c +++ b/lib/sbi/openapi/model/traffic_influ_data.c @@ -555,7 +555,6 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr OpenAPI_eth_flow_description_t *eth_traffic_filtersItem = OpenAPI_eth_flow_description_parseFromJSON(eth_traffic_filters_local); if (!eth_traffic_filtersItem) { ogs_error("No eth_traffic_filtersItem"); - OpenAPI_list_free(eth_traffic_filtersList); goto end; } OpenAPI_list_add(eth_traffic_filtersList, eth_traffic_filtersItem); @@ -565,6 +564,10 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr snssai = cJSON_GetObjectItemCaseSensitive(traffic_influ_dataJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } inter_group_id = cJSON_GetObjectItemCaseSensitive(traffic_influ_dataJSON, "interGroupId"); @@ -601,7 +604,6 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr OpenAPI_flow_info_t *traffic_filtersItem = OpenAPI_flow_info_parseFromJSON(traffic_filters_local); if (!traffic_filtersItem) { ogs_error("No traffic_filtersItem"); - OpenAPI_list_free(traffic_filtersList); goto end; } OpenAPI_list_add(traffic_filtersList, traffic_filtersItem); @@ -626,7 +628,6 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr OpenAPI_route_to_location_t *traffic_routesItem = OpenAPI_route_to_location_parseFromJSON(traffic_routes_local); if (!traffic_routesItem) { ogs_error("No traffic_routesItem"); - OpenAPI_list_free(traffic_routesList); goto end; } OpenAPI_list_add(traffic_routesList, traffic_routesItem); @@ -675,7 +676,6 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr OpenAPI_temporal_validity_t *temp_validitiesItem = OpenAPI_temporal_validity_parseFromJSON(temp_validities_local); if (!temp_validitiesItem) { ogs_error("No temp_validitiesItem"); - OpenAPI_list_free(temp_validitiesList); goto end; } OpenAPI_list_add(temp_validitiesList, temp_validitiesItem); @@ -685,6 +685,10 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr nw_area_info = cJSON_GetObjectItemCaseSensitive(traffic_influ_dataJSON, "nwAreaInfo"); if (nw_area_info) { nw_area_info_local_nonprim = OpenAPI_network_area_info_2_parseFromJSON(nw_area_info); + if (!nw_area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_2_parseFromJSON failed [nw_area_info]"); + goto end; + } } up_path_chg_notif_uri = cJSON_GetObjectItemCaseSensitive(traffic_influ_dataJSON, "upPathChgNotifUri"); @@ -734,7 +738,6 @@ OpenAPI_traffic_influ_data_t *OpenAPI_traffic_influ_data_parseFromJSON(cJSON *tr OpenAPI_subscribed_event_t *subscribed_eventsItem = OpenAPI_subscribed_event_parseFromJSON(subscribed_events_local); if (!subscribed_eventsItem) { ogs_error("No subscribed_eventsItem"); - OpenAPI_list_free(subscribed_eventsList); goto end; } OpenAPI_list_add(subscribed_eventsList, subscribed_eventsItem); diff --git a/lib/sbi/openapi/model/traffic_influ_data_notif.c b/lib/sbi/openapi/model/traffic_influ_data_notif.c index 748c9e36f..264f56840 100644 --- a/lib/sbi/openapi/model/traffic_influ_data_notif.c +++ b/lib/sbi/openapi/model/traffic_influ_data_notif.c @@ -93,6 +93,10 @@ OpenAPI_traffic_influ_data_notif_t *OpenAPI_traffic_influ_data_notif_parseFromJS traffic_influ_data = cJSON_GetObjectItemCaseSensitive(traffic_influ_data_notifJSON, "trafficInfluData"); if (traffic_influ_data) { traffic_influ_data_local_nonprim = OpenAPI_traffic_influ_data_parseFromJSON(traffic_influ_data); + if (!traffic_influ_data_local_nonprim) { + ogs_error("OpenAPI_traffic_influ_data_parseFromJSON failed [traffic_influ_data]"); + goto end; + } } traffic_influ_data_notif_local_var = OpenAPI_traffic_influ_data_notif_create ( diff --git a/lib/sbi/openapi/model/traffic_influ_data_patch.c b/lib/sbi/openapi/model/traffic_influ_data_patch.c index 96f852c93..523cba0ec 100644 --- a/lib/sbi/openapi/model/traffic_influ_data_patch.c +++ b/lib/sbi/openapi/model/traffic_influ_data_patch.c @@ -371,7 +371,6 @@ OpenAPI_traffic_influ_data_patch_t *OpenAPI_traffic_influ_data_patch_parseFromJS OpenAPI_eth_flow_description_t *eth_traffic_filtersItem = OpenAPI_eth_flow_description_parseFromJSON(eth_traffic_filters_local); if (!eth_traffic_filtersItem) { ogs_error("No eth_traffic_filtersItem"); - OpenAPI_list_free(eth_traffic_filtersList); goto end; } OpenAPI_list_add(eth_traffic_filtersList, eth_traffic_filtersItem); @@ -396,7 +395,6 @@ OpenAPI_traffic_influ_data_patch_t *OpenAPI_traffic_influ_data_patch_parseFromJS OpenAPI_flow_info_t *traffic_filtersItem = OpenAPI_flow_info_parseFromJSON(traffic_filters_local); if (!traffic_filtersItem) { ogs_error("No traffic_filtersItem"); - OpenAPI_list_free(traffic_filtersList); goto end; } OpenAPI_list_add(traffic_filtersList, traffic_filtersItem); @@ -421,7 +419,6 @@ OpenAPI_traffic_influ_data_patch_t *OpenAPI_traffic_influ_data_patch_parseFromJS OpenAPI_route_to_location_t *traffic_routesItem = OpenAPI_route_to_location_parseFromJSON(traffic_routes_local); if (!traffic_routesItem) { ogs_error("No traffic_routesItem"); - OpenAPI_list_free(traffic_routesList); goto end; } OpenAPI_list_add(traffic_routesList, traffic_routesItem); @@ -470,7 +467,6 @@ OpenAPI_traffic_influ_data_patch_t *OpenAPI_traffic_influ_data_patch_parseFromJS OpenAPI_temporal_validity_t *temp_validitiesItem = OpenAPI_temporal_validity_parseFromJSON(temp_validities_local); if (!temp_validitiesItem) { ogs_error("No temp_validitiesItem"); - OpenAPI_list_free(temp_validitiesList); goto end; } OpenAPI_list_add(temp_validitiesList, temp_validitiesItem); @@ -480,6 +476,10 @@ OpenAPI_traffic_influ_data_patch_t *OpenAPI_traffic_influ_data_patch_parseFromJS nw_area_info = cJSON_GetObjectItemCaseSensitive(traffic_influ_data_patchJSON, "nwAreaInfo"); if (nw_area_info) { nw_area_info_local_nonprim = OpenAPI_network_area_info_2_parseFromJSON(nw_area_info); + if (!nw_area_info_local_nonprim) { + ogs_error("OpenAPI_network_area_info_2_parseFromJSON failed [nw_area_info]"); + goto end; + } } up_path_chg_notif_uri = cJSON_GetObjectItemCaseSensitive(traffic_influ_data_patchJSON, "upPathChgNotifUri"); diff --git a/lib/sbi/openapi/model/traffic_influ_sub.c b/lib/sbi/openapi/model/traffic_influ_sub.c index 84c153023..77fae497e 100644 --- a/lib/sbi/openapi/model/traffic_influ_sub.c +++ b/lib/sbi/openapi/model/traffic_influ_sub.c @@ -253,7 +253,6 @@ OpenAPI_traffic_influ_sub_t *OpenAPI_traffic_influ_sub_parseFromJSON(cJSON *traf OpenAPI_snssai_t *snssaisItem = OpenAPI_snssai_parseFromJSON(snssais_local); if (!snssaisItem) { ogs_error("No snssaisItem"); - OpenAPI_list_free(snssaisList); goto end; } OpenAPI_list_add(snssaisList, snssaisItem); diff --git a/lib/sbi/openapi/model/transfer_mo_data_req_data.c b/lib/sbi/openapi/model/transfer_mo_data_req_data.c index e6e117154..c443b341f 100644 --- a/lib/sbi/openapi/model/transfer_mo_data_req_data.c +++ b/lib/sbi/openapi/model/transfer_mo_data_req_data.c @@ -114,15 +114,27 @@ OpenAPI_transfer_mo_data_req_data_t *OpenAPI_transfer_mo_data_req_data_parseFrom goto end; } mo_data_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(mo_data); + if (!mo_data_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [mo_data]"); + goto end; + } mo_exp_data_counter = cJSON_GetObjectItemCaseSensitive(transfer_mo_data_req_dataJSON, "moExpDataCounter"); if (mo_exp_data_counter) { mo_exp_data_counter_local_nonprim = OpenAPI_mo_exp_data_counter_parseFromJSON(mo_exp_data_counter); + if (!mo_exp_data_counter_local_nonprim) { + ogs_error("OpenAPI_mo_exp_data_counter_parseFromJSON failed [mo_exp_data_counter]"); + goto end; + } } ue_location = cJSON_GetObjectItemCaseSensitive(transfer_mo_data_req_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } transfer_mo_data_req_data_local_var = OpenAPI_transfer_mo_data_req_data_create ( diff --git a/lib/sbi/openapi/model/transfer_mo_data_request.c b/lib/sbi/openapi/model/transfer_mo_data_request.c index cb1dd4f01..15e1eb390 100644 --- a/lib/sbi/openapi/model/transfer_mo_data_request.c +++ b/lib/sbi/openapi/model/transfer_mo_data_request.c @@ -84,6 +84,10 @@ OpenAPI_transfer_mo_data_request_t *OpenAPI_transfer_mo_data_request_parseFromJS json_data = cJSON_GetObjectItemCaseSensitive(transfer_mo_data_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_transfer_mo_data_req_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_transfer_mo_data_req_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_mo_data = cJSON_GetObjectItemCaseSensitive(transfer_mo_data_requestJSON, "binaryMoData"); diff --git a/lib/sbi/openapi/model/transfer_mt_data_error.c b/lib/sbi/openapi/model/transfer_mt_data_error.c index 1824f9385..b328020dd 100644 --- a/lib/sbi/openapi/model/transfer_mt_data_error.c +++ b/lib/sbi/openapi/model/transfer_mt_data_error.c @@ -312,7 +312,6 @@ OpenAPI_transfer_mt_data_error_t *OpenAPI_transfer_mt_data_error_parseFromJSON(c OpenAPI_invalid_param_t *invalid_paramsItem = OpenAPI_invalid_param_parseFromJSON(invalid_params_local); if (!invalid_paramsItem) { ogs_error("No invalid_paramsItem"); - OpenAPI_list_free(invalid_paramsList); goto end; } OpenAPI_list_add(invalid_paramsList, invalid_paramsItem); @@ -330,11 +329,19 @@ OpenAPI_transfer_mt_data_error_t *OpenAPI_transfer_mt_data_error_parseFromJSON(c access_token_error = cJSON_GetObjectItemCaseSensitive(transfer_mt_data_errorJSON, "accessTokenError"); if (access_token_error) { access_token_error_local_nonprim = OpenAPI_access_token_err_parseFromJSON(access_token_error); + if (!access_token_error_local_nonprim) { + ogs_error("OpenAPI_access_token_err_parseFromJSON failed [access_token_error]"); + goto end; + } } access_token_request = cJSON_GetObjectItemCaseSensitive(transfer_mt_data_errorJSON, "accessTokenRequest"); if (access_token_request) { access_token_request_local_nonprim = OpenAPI_access_token_req_parseFromJSON(access_token_request); + if (!access_token_request_local_nonprim) { + ogs_error("OpenAPI_access_token_req_parseFromJSON failed [access_token_request]"); + goto end; + } } nrf_id = cJSON_GetObjectItemCaseSensitive(transfer_mt_data_errorJSON, "nrfId"); diff --git a/lib/sbi/openapi/model/transfer_mt_data_ismf_request.c b/lib/sbi/openapi/model/transfer_mt_data_ismf_request.c index e00072fba..1e3312f50 100644 --- a/lib/sbi/openapi/model/transfer_mt_data_ismf_request.c +++ b/lib/sbi/openapi/model/transfer_mt_data_ismf_request.c @@ -84,6 +84,10 @@ OpenAPI_transfer_mt_data_ismf_request_t *OpenAPI_transfer_mt_data_ismf_request_p json_data = cJSON_GetObjectItemCaseSensitive(transfer_mt_data_ismf_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_transfer_mt_data_req_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_transfer_mt_data_req_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_mt_data = cJSON_GetObjectItemCaseSensitive(transfer_mt_data_ismf_requestJSON, "binaryMtData"); diff --git a/lib/sbi/openapi/model/transfer_mt_data_req_data.c b/lib/sbi/openapi/model/transfer_mt_data_req_data.c index 9a45c97c8..3346add24 100644 --- a/lib/sbi/openapi/model/transfer_mt_data_req_data.c +++ b/lib/sbi/openapi/model/transfer_mt_data_req_data.c @@ -72,6 +72,10 @@ OpenAPI_transfer_mt_data_req_data_t *OpenAPI_transfer_mt_data_req_data_parseFrom goto end; } mt_data_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(mt_data); + if (!mt_data_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [mt_data]"); + goto end; + } transfer_mt_data_req_data_local_var = OpenAPI_transfer_mt_data_req_data_create ( mt_data_local_nonprim diff --git a/lib/sbi/openapi/model/transfer_policy.c b/lib/sbi/openapi/model/transfer_policy.c index 6654d8979..217a2e7fa 100644 --- a/lib/sbi/openapi/model/transfer_policy.c +++ b/lib/sbi/openapi/model/transfer_policy.c @@ -142,6 +142,10 @@ OpenAPI_transfer_policy_t *OpenAPI_transfer_policy_parseFromJSON(cJSON *transfer goto end; } rec_time_int_local_nonprim = OpenAPI_time_window_parseFromJSON(rec_time_int); + if (!rec_time_int_local_nonprim) { + ogs_error("OpenAPI_time_window_parseFromJSON failed [rec_time_int]"); + goto end; + } trans_policy_id = cJSON_GetObjectItemCaseSensitive(transfer_policyJSON, "transPolicyId"); if (!trans_policy_id) { diff --git a/lib/sbi/openapi/model/trigger.c b/lib/sbi/openapi/model/trigger.c index 10785be81..c627da1eb 100644 --- a/lib/sbi/openapi/model/trigger.c +++ b/lib/sbi/openapi/model/trigger.c @@ -169,6 +169,10 @@ OpenAPI_trigger_t *OpenAPI_trigger_parseFromJSON(cJSON *triggerJSON) goto end; } trigger_type_local_nonprim = OpenAPI_trigger_type_parseFromJSON(trigger_type); + if (!trigger_type_local_nonprim) { + ogs_error("OpenAPI_trigger_type_parseFromJSON failed [trigger_type]"); + goto end; + } trigger_category = cJSON_GetObjectItemCaseSensitive(triggerJSON, "triggerCategory"); if (!trigger_category) { @@ -176,6 +180,10 @@ OpenAPI_trigger_t *OpenAPI_trigger_parseFromJSON(cJSON *triggerJSON) goto end; } trigger_category_local_nonprim = OpenAPI_trigger_category_parseFromJSON(trigger_category); + if (!trigger_category_local_nonprim) { + ogs_error("OpenAPI_trigger_category_parseFromJSON failed [trigger_category]"); + goto end; + } time_limit = cJSON_GetObjectItemCaseSensitive(triggerJSON, "timeLimit"); if (time_limit) { diff --git a/lib/sbi/openapi/model/trigger_request.c b/lib/sbi/openapi/model/trigger_request.c index 9a252eb2b..384d4fbc2 100644 --- a/lib/sbi/openapi/model/trigger_request.c +++ b/lib/sbi/openapi/model/trigger_request.c @@ -93,6 +93,10 @@ OpenAPI_trigger_request_t *OpenAPI_trigger_request_parseFromJSON(cJSON *trigger_ failed_pcscf = cJSON_GetObjectItemCaseSensitive(trigger_requestJSON, "failedPcscf"); if (failed_pcscf) { failed_pcscf_local_nonprim = OpenAPI_pcscf_address_parseFromJSON(failed_pcscf); + if (!failed_pcscf_local_nonprim) { + ogs_error("OpenAPI_pcscf_address_parseFromJSON failed [failed_pcscf]"); + goto end; + } } trigger_request_local_var = OpenAPI_trigger_request_create ( diff --git a/lib/sbi/openapi/model/trust_af_info.c b/lib/sbi/openapi/model/trust_af_info.c index a3d92c797..28c24f943 100644 --- a/lib/sbi/openapi/model/trust_af_info.c +++ b/lib/sbi/openapi/model/trust_af_info.c @@ -172,7 +172,6 @@ OpenAPI_trust_af_info_t *OpenAPI_trust_af_info_parseFromJSON(cJSON *trust_af_inf OpenAPI_snssai_info_item_t *s_nssai_info_listItem = OpenAPI_snssai_info_item_parseFromJSON(s_nssai_info_list_local); if (!s_nssai_info_listItem) { ogs_error("No s_nssai_info_listItem"); - OpenAPI_list_free(s_nssai_info_listList); goto end; } OpenAPI_list_add(s_nssai_info_listList, s_nssai_info_listItem); diff --git a/lib/sbi/openapi/model/tsctsf_info.c b/lib/sbi/openapi/model/tsctsf_info.c index 59c1bd3e7..cff6035e8 100644 --- a/lib/sbi/openapi/model/tsctsf_info.c +++ b/lib/sbi/openapi/model/tsctsf_info.c @@ -231,7 +231,6 @@ OpenAPI_tsctsf_info_t *OpenAPI_tsctsf_info_parseFromJSON(cJSON *tsctsf_infoJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -256,7 +255,6 @@ OpenAPI_tsctsf_info_t *OpenAPI_tsctsf_info_parseFromJSON(cJSON *tsctsf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -281,7 +279,6 @@ OpenAPI_tsctsf_info_t *OpenAPI_tsctsf_info_parseFromJSON(cJSON *tsctsf_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -306,7 +303,6 @@ OpenAPI_tsctsf_info_t *OpenAPI_tsctsf_info_parseFromJSON(cJSON *tsctsf_infoJSON) OpenAPI_internal_group_id_range_t *internal_group_identifiers_rangesItem = OpenAPI_internal_group_id_range_parseFromJSON(internal_group_identifiers_ranges_local); if (!internal_group_identifiers_rangesItem) { ogs_error("No internal_group_identifiers_rangesItem"); - OpenAPI_list_free(internal_group_identifiers_rangesList); goto end; } OpenAPI_list_add(internal_group_identifiers_rangesList, internal_group_identifiers_rangesItem); diff --git a/lib/sbi/openapi/model/udm_info.c b/lib/sbi/openapi/model/udm_info.c index 965823403..0f182ed96 100644 --- a/lib/sbi/openapi/model/udm_info.c +++ b/lib/sbi/openapi/model/udm_info.c @@ -243,7 +243,6 @@ OpenAPI_udm_info_t *OpenAPI_udm_info_parseFromJSON(cJSON *udm_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -268,7 +267,6 @@ OpenAPI_udm_info_t *OpenAPI_udm_info_parseFromJSON(cJSON *udm_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -293,7 +291,6 @@ OpenAPI_udm_info_t *OpenAPI_udm_info_parseFromJSON(cJSON *udm_infoJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -339,7 +336,6 @@ OpenAPI_udm_info_t *OpenAPI_udm_info_parseFromJSON(cJSON *udm_infoJSON) OpenAPI_internal_group_id_range_t *internal_group_identifiers_rangesItem = OpenAPI_internal_group_id_range_parseFromJSON(internal_group_identifiers_ranges_local); if (!internal_group_identifiers_rangesItem) { ogs_error("No internal_group_identifiers_rangesItem"); - OpenAPI_list_free(internal_group_identifiers_rangesList); goto end; } OpenAPI_list_add(internal_group_identifiers_rangesList, internal_group_identifiers_rangesItem); @@ -364,7 +360,6 @@ OpenAPI_udm_info_t *OpenAPI_udm_info_parseFromJSON(cJSON *udm_infoJSON) OpenAPI_suci_info_t *suci_infosItem = OpenAPI_suci_info_parseFromJSON(suci_infos_local); if (!suci_infosItem) { ogs_error("No suci_infosItem"); - OpenAPI_list_free(suci_infosList); goto end; } OpenAPI_list_add(suci_infosList, suci_infosItem); diff --git a/lib/sbi/openapi/model/udr_info.c b/lib/sbi/openapi/model/udr_info.c index 7e6fe0200..78ff0fcba 100644 --- a/lib/sbi/openapi/model/udr_info.c +++ b/lib/sbi/openapi/model/udr_info.c @@ -213,7 +213,6 @@ OpenAPI_udr_info_t *OpenAPI_udr_info_parseFromJSON(cJSON *udr_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); @@ -238,7 +237,6 @@ OpenAPI_udr_info_t *OpenAPI_udr_info_parseFromJSON(cJSON *udr_infoJSON) OpenAPI_identity_range_t *gpsi_rangesItem = OpenAPI_identity_range_parseFromJSON(gpsi_ranges_local); if (!gpsi_rangesItem) { ogs_error("No gpsi_rangesItem"); - OpenAPI_list_free(gpsi_rangesList); goto end; } OpenAPI_list_add(gpsi_rangesList, gpsi_rangesItem); @@ -263,7 +261,6 @@ OpenAPI_udr_info_t *OpenAPI_udr_info_parseFromJSON(cJSON *udr_infoJSON) OpenAPI_identity_range_t *external_group_identifiers_rangesItem = OpenAPI_identity_range_parseFromJSON(external_group_identifiers_ranges_local); if (!external_group_identifiers_rangesItem) { ogs_error("No external_group_identifiers_rangesItem"); - OpenAPI_list_free(external_group_identifiers_rangesList); goto end; } OpenAPI_list_add(external_group_identifiers_rangesList, external_group_identifiers_rangesItem); @@ -307,7 +304,6 @@ OpenAPI_udr_info_t *OpenAPI_udr_info_parseFromJSON(cJSON *udr_infoJSON) OpenAPI_shared_data_id_range_t *shared_data_id_rangesItem = OpenAPI_shared_data_id_range_parseFromJSON(shared_data_id_ranges_local); if (!shared_data_id_rangesItem) { ogs_error("No shared_data_id_rangesItem"); - OpenAPI_list_free(shared_data_id_rangesList); goto end; } OpenAPI_list_add(shared_data_id_rangesList, shared_data_id_rangesItem); diff --git a/lib/sbi/openapi/model/udsf_info.c b/lib/sbi/openapi/model/udsf_info.c index 33b8a870d..11c0430c0 100644 --- a/lib/sbi/openapi/model/udsf_info.c +++ b/lib/sbi/openapi/model/udsf_info.c @@ -146,7 +146,6 @@ OpenAPI_udsf_info_t *OpenAPI_udsf_info_parseFromJSON(cJSON *udsf_infoJSON) OpenAPI_supi_range_t *supi_rangesItem = OpenAPI_supi_range_parseFromJSON(supi_ranges_local); if (!supi_rangesItem) { ogs_error("No supi_rangesItem"); - OpenAPI_list_free(supi_rangesList); goto end; } OpenAPI_list_add(supi_rangesList, supi_rangesItem); diff --git a/lib/sbi/openapi/model/ue_analytics_context_descriptor.c b/lib/sbi/openapi/model/ue_analytics_context_descriptor.c index 83be5cfb7..ad23a1a22 100644 --- a/lib/sbi/openapi/model/ue_analytics_context_descriptor.c +++ b/lib/sbi/openapi/model/ue_analytics_context_descriptor.c @@ -119,7 +119,6 @@ OpenAPI_ue_analytics_context_descriptor_t *OpenAPI_ue_analytics_context_descript OpenAPI_nwdaf_event_t *ana_typesItem = OpenAPI_nwdaf_event_parseFromJSON(ana_types_local); if (!ana_typesItem) { ogs_error("No ana_typesItem"); - OpenAPI_list_free(ana_typesList); goto end; } OpenAPI_list_add(ana_typesList, ana_typesItem); diff --git a/lib/sbi/openapi/model/ue_authentication_ctx.c b/lib/sbi/openapi/model/ue_authentication_ctx.c index 14189ba9d..c67db6dfc 100644 --- a/lib/sbi/openapi/model/ue_authentication_ctx.c +++ b/lib/sbi/openapi/model/ue_authentication_ctx.c @@ -148,6 +148,10 @@ OpenAPI_ue_authentication_ctx_t *OpenAPI_ue_authentication_ctx_parseFromJSON(cJS goto end; } _5g_auth_data_local_nonprim = OpenAPI_ue_authentication_ctx_5g_auth_data_parseFromJSON(_5g_auth_data); + if (!_5g_auth_data_local_nonprim) { + ogs_error("OpenAPI_ue_authentication_ctx_5g_auth_data_parseFromJSON failed [_5g_auth_data]"); + goto end; + } _links = cJSON_GetObjectItemCaseSensitive(ue_authentication_ctxJSON, "_links"); if (!_links) { diff --git a/lib/sbi/openapi/model/ue_camping_rep.c b/lib/sbi/openapi/model/ue_camping_rep.c index 2a938a774..b962ade55 100644 --- a/lib/sbi/openapi/model/ue_camping_rep.c +++ b/lib/sbi/openapi/model/ue_camping_rep.c @@ -185,16 +185,28 @@ OpenAPI_ue_camping_rep_t *OpenAPI_ue_camping_rep_parseFromJSON(cJSON *ue_camping serv_nf_id = cJSON_GetObjectItemCaseSensitive(ue_camping_repJSON, "servNfId"); if (serv_nf_id) { serv_nf_id_local_nonprim = OpenAPI_serving_nf_identity_parseFromJSON(serv_nf_id); + if (!serv_nf_id_local_nonprim) { + ogs_error("OpenAPI_serving_nf_identity_parseFromJSON failed [serv_nf_id]"); + goto end; + } } serving_network = cJSON_GetObjectItemCaseSensitive(ue_camping_repJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } user_location_info = cJSON_GetObjectItemCaseSensitive(ue_camping_repJSON, "userLocationInfo"); if (user_location_info) { user_location_info_local_nonprim = OpenAPI_user_location_parseFromJSON(user_location_info); + if (!user_location_info_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [user_location_info]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(ue_camping_repJSON, "ueTimeZone"); diff --git a/lib/sbi/openapi/model/ue_communication.c b/lib/sbi/openapi/model/ue_communication.c index 582b549a7..c9d7199c3 100644 --- a/lib/sbi/openapi/model/ue_communication.c +++ b/lib/sbi/openapi/model/ue_communication.c @@ -288,11 +288,19 @@ OpenAPI_ue_communication_t *OpenAPI_ue_communication_parseFromJSON(cJSON *ue_com recurring_time = cJSON_GetObjectItemCaseSensitive(ue_communicationJSON, "recurringTime"); if (recurring_time) { recurring_time_local_nonprim = OpenAPI_scheduled_communication_time_1_parseFromJSON(recurring_time); + if (!recurring_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_1_parseFromJSON failed [recurring_time]"); + goto end; + } } traf_char = cJSON_GetObjectItemCaseSensitive(ue_communicationJSON, "trafChar"); if (traf_char) { traf_char_local_nonprim = OpenAPI_traffic_characterization_parseFromJSON(traf_char); + if (!traf_char_local_nonprim) { + ogs_error("OpenAPI_traffic_characterization_parseFromJSON failed [traf_char]"); + goto end; + } } ratio = cJSON_GetObjectItemCaseSensitive(ue_communicationJSON, "ratio"); @@ -322,11 +330,19 @@ OpenAPI_ue_communication_t *OpenAPI_ue_communication_parseFromJSON(cJSON *ue_com ana_of_app_list = cJSON_GetObjectItemCaseSensitive(ue_communicationJSON, "anaOfAppList"); if (ana_of_app_list) { ana_of_app_list_local_nonprim = OpenAPI_app_list_for_ue_comm_parseFromJSON(ana_of_app_list); + if (!ana_of_app_list_local_nonprim) { + ogs_error("OpenAPI_app_list_for_ue_comm_parseFromJSON failed [ana_of_app_list]"); + goto end; + } } sess_inact_timer = cJSON_GetObjectItemCaseSensitive(ue_communicationJSON, "sessInactTimer"); if (sess_inact_timer) { sess_inact_timer_local_nonprim = OpenAPI_sess_inact_timer_for_ue_comm_parseFromJSON(sess_inact_timer); + if (!sess_inact_timer_local_nonprim) { + ogs_error("OpenAPI_sess_inact_timer_for_ue_comm_parseFromJSON failed [sess_inact_timer]"); + goto end; + } } ue_communication_local_var = OpenAPI_ue_communication_create ( diff --git a/lib/sbi/openapi/model/ue_context.c b/lib/sbi/openapi/model/ue_context.c index 0e42fb01b..269088ffd 100644 --- a/lib/sbi/openapi/model/ue_context.c +++ b/lib/sbi/openapi/model/ue_context.c @@ -1597,6 +1597,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) sub_ue_ambr = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "subUeAmbr"); if (sub_ue_ambr) { sub_ue_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(sub_ue_ambr); + if (!sub_ue_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [sub_ue_ambr]"); + goto end; + } } sub_ue_slice_mbr_list = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "subUeSliceMbrList"); @@ -1636,6 +1640,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) seaf_data = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "seafData"); if (seaf_data) { seaf_data_local_nonprim = OpenAPI_seaf_data_parseFromJSON(seaf_data); + if (!seaf_data_local_nonprim) { + ogs_error("OpenAPI_seaf_data_parseFromJSON failed [seaf_data]"); + goto end; + } } _5g_mm_capability = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "5gMmCapability"); @@ -1794,7 +1802,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_area_t *forbidden_area_listItem = OpenAPI_area_parseFromJSON(forbidden_area_list_local); if (!forbidden_area_listItem) { ogs_error("No forbidden_area_listItem"); - OpenAPI_list_free(forbidden_area_listList); goto end; } OpenAPI_list_add(forbidden_area_listList, forbidden_area_listItem); @@ -1804,6 +1811,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) service_area_restriction = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "serviceAreaRestriction"); if (service_area_restriction) { service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(service_area_restriction); + if (!service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [service_area_restriction]"); + goto end; + } } restricted_core_nw_type_list = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "restrictedCoreNwTypeList"); @@ -1843,7 +1854,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_ext_amf_event_subscription_t *event_subscription_listItem = OpenAPI_ext_amf_event_subscription_parseFromJSON(event_subscription_list_local); if (!event_subscription_listItem) { ogs_error("No event_subscription_listItem"); - OpenAPI_list_free(event_subscription_listList); goto end; } OpenAPI_list_add(event_subscription_listList, event_subscription_listItem); @@ -1868,7 +1878,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_mm_context_t *mm_context_listItem = OpenAPI_mm_context_parseFromJSON(mm_context_list_local); if (!mm_context_listItem) { ogs_error("No mm_context_listItem"); - OpenAPI_list_free(mm_context_listList); goto end; } OpenAPI_list_add(mm_context_listList, mm_context_listItem); @@ -1893,7 +1902,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_pdu_session_context_t *session_context_listItem = OpenAPI_pdu_session_context_parseFromJSON(session_context_list_local); if (!session_context_listItem) { ogs_error("No session_context_listItem"); - OpenAPI_list_free(session_context_listList); goto end; } OpenAPI_list_add(session_context_listList, session_context_listItem); @@ -1903,11 +1911,19 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) eps_interworking_info = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "epsInterworkingInfo"); if (eps_interworking_info) { eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info); + if (!eps_interworking_info_local_nonprim) { + ogs_error("OpenAPI_eps_interworking_info_parseFromJSON failed [eps_interworking_info]"); + goto end; + } } trace_data = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "traceData"); if (trace_data) { trace_data_local_nonprim = OpenAPI_trace_data_parseFromJSON(trace_data); + if (!trace_data_local_nonprim) { + ogs_error("OpenAPI_trace_data_parseFromJSON failed [trace_data]"); + goto end; + } } service_gap_expiry_time = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "serviceGapExpiryTime"); @@ -1981,7 +1997,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_small_data_rate_status_info_t *small_data_rate_status_infosItem = OpenAPI_small_data_rate_status_info_parseFromJSON(small_data_rate_status_infos_local); if (!small_data_rate_status_infosItem) { ogs_error("No small_data_rate_status_infosItem"); - OpenAPI_list_free(small_data_rate_status_infosList); goto end; } OpenAPI_list_add(small_data_rate_status_infosList, small_data_rate_status_infosItem); @@ -2029,6 +2044,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) v2x_context = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "v2xContext"); if (v2x_context) { v2x_context_local_nonprim = OpenAPI_v2x_context_parseFromJSON(v2x_context); + if (!v2x_context_local_nonprim) { + ogs_error("OpenAPI_v2x_context_parseFromJSON failed [v2x_context]"); + goto end; + } } lte_cat_m_ind = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "lteCatMInd"); @@ -2050,11 +2069,19 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) mo_exp_data_counter = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "moExpDataCounter"); if (mo_exp_data_counter) { mo_exp_data_counter_local_nonprim = OpenAPI_mo_exp_data_counter_parseFromJSON(mo_exp_data_counter); + if (!mo_exp_data_counter_local_nonprim) { + ogs_error("OpenAPI_mo_exp_data_counter_parseFromJSON failed [mo_exp_data_counter]"); + goto end; + } } cag_data = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "cagData"); if (cag_data) { cag_data_local_nonprim = OpenAPI_cag_data_parseFromJSON(cag_data); + if (!cag_data_local_nonprim) { + ogs_error("OpenAPI_cag_data_parseFromJSON failed [cag_data]"); + goto end; + } } management_mdt_ind = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "managementMdtInd"); @@ -2068,11 +2095,19 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) immediate_mdt_conf = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "immediateMdtConf"); if (immediate_mdt_conf) { immediate_mdt_conf_local_nonprim = OpenAPI_immediate_mdt_conf_parseFromJSON(immediate_mdt_conf); + if (!immediate_mdt_conf_local_nonprim) { + ogs_error("OpenAPI_immediate_mdt_conf_parseFromJSON failed [immediate_mdt_conf]"); + goto end; + } } ec_restriction_data_wb = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "ecRestrictionDataWb"); if (ec_restriction_data_wb) { ec_restriction_data_wb_local_nonprim = OpenAPI_ec_restriction_data_wb_parseFromJSON(ec_restriction_data_wb); + if (!ec_restriction_data_wb_local_nonprim) { + ogs_error("OpenAPI_ec_restriction_data_wb_parseFromJSON failed [ec_restriction_data_wb]"); + goto end; + } } ec_restriction_data_nb = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "ecRestrictionDataNb"); @@ -2094,6 +2129,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) prose_context = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "proseContext"); if (prose_context) { prose_context_local_nonprim = OpenAPI_prose_context_parseFromJSON(prose_context); + if (!prose_context_local_nonprim) { + ogs_error("OpenAPI_prose_context_parseFromJSON failed [prose_context]"); + goto end; + } } analytics_subscription_list = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "analyticsSubscriptionList"); @@ -2114,7 +2153,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_analytics_subscription_t *analytics_subscription_listItem = OpenAPI_analytics_subscription_parseFromJSON(analytics_subscription_list_local); if (!analytics_subscription_listItem) { ogs_error("No analytics_subscription_listItem"); - OpenAPI_list_free(analytics_subscription_listList); goto end; } OpenAPI_list_add(analytics_subscription_listList, analytics_subscription_listItem); @@ -2140,6 +2178,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) used_service_area_restriction = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "usedServiceAreaRestriction"); if (used_service_area_restriction) { used_service_area_restriction_local_nonprim = OpenAPI_service_area_restriction_parseFromJSON(used_service_area_restriction); + if (!used_service_area_restriction_local_nonprim) { + ogs_error("OpenAPI_service_area_restriction_parseFromJSON failed [used_service_area_restriction]"); + goto end; + } } pra_in_am_policy = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "praInAmPolicy"); @@ -2197,6 +2239,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) updp_subscription_data = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "updpSubscriptionData"); if (updp_subscription_data) { updp_subscription_data_local_nonprim = OpenAPI_updp_subscription_data_parseFromJSON(updp_subscription_data); + if (!updp_subscription_data_local_nonprim) { + ogs_error("OpenAPI_updp_subscription_data_parseFromJSON failed [updp_subscription_data]"); + goto end; + } } sm_policy_notify_pdu_list = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "smPolicyNotifyPduList"); @@ -2217,7 +2263,6 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) OpenAPI_pdu_session_info_t *sm_policy_notify_pdu_listItem = OpenAPI_pdu_session_info_parseFromJSON(sm_policy_notify_pdu_list_local); if (!sm_policy_notify_pdu_listItem) { ogs_error("No sm_policy_notify_pdu_listItem"); - OpenAPI_list_free(sm_policy_notify_pdu_listList); goto end; } OpenAPI_list_add(sm_policy_notify_pdu_listList, sm_policy_notify_pdu_listItem); @@ -2227,6 +2272,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) pcf_ue_callback_info = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "pcfUeCallbackInfo"); if (pcf_ue_callback_info) { pcf_ue_callback_info_local_nonprim = OpenAPI_pcf_ue_callback_info_parseFromJSON(pcf_ue_callback_info); + if (!pcf_ue_callback_info_local_nonprim) { + ogs_error("OpenAPI_pcf_ue_callback_info_parseFromJSON failed [pcf_ue_callback_info]"); + goto end; + } } ue_positioning_cap = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "uePositioningCap"); @@ -2264,6 +2313,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) smf_sel_info = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "smfSelInfo"); if (smf_sel_info) { smf_sel_info_local_nonprim = OpenAPI_smf_selection_data_parseFromJSON(smf_sel_info); + if (!smf_sel_info_local_nonprim) { + ogs_error("OpenAPI_smf_selection_data_parseFromJSON failed [smf_sel_info]"); + goto end; + } } pcf_ue_slice_mbr_list = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "pcfUeSliceMbrList"); @@ -2327,6 +2380,10 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON) disaster_plmn = cJSON_GetObjectItemCaseSensitive(ue_contextJSON, "disasterPlmn"); if (disaster_plmn) { disaster_plmn_local_nonprim = OpenAPI_plmn_id_parseFromJSON(disaster_plmn); + if (!disaster_plmn_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [disaster_plmn]"); + goto end; + } } ue_context_local_var = OpenAPI_ue_context_create ( diff --git a/lib/sbi/openapi/model/ue_context_cancel_relocate_data.c b/lib/sbi/openapi/model/ue_context_cancel_relocate_data.c index 6016e28b5..f18c44899 100644 --- a/lib/sbi/openapi/model/ue_context_cancel_relocate_data.c +++ b/lib/sbi/openapi/model/ue_context_cancel_relocate_data.c @@ -94,6 +94,10 @@ OpenAPI_ue_context_cancel_relocate_data_t *OpenAPI_ue_context_cancel_relocate_da goto end; } relocation_cancel_request_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(relocation_cancel_request); + if (!relocation_cancel_request_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [relocation_cancel_request]"); + goto end; + } ue_context_cancel_relocate_data_local_var = OpenAPI_ue_context_cancel_relocate_data_create ( supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL, diff --git a/lib/sbi/openapi/model/ue_context_create_data.c b/lib/sbi/openapi/model/ue_context_create_data.c index b91b97b05..c423e250b 100644 --- a/lib/sbi/openapi/model/ue_context_create_data.c +++ b/lib/sbi/openapi/model/ue_context_create_data.c @@ -259,6 +259,10 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } target_id = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "targetId"); if (!target_id) { @@ -266,6 +270,10 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c goto end; } target_id_local_nonprim = OpenAPI_ng_ran_target_id_parseFromJSON(target_id); + if (!target_id_local_nonprim) { + ogs_error("OpenAPI_ng_ran_target_id_parseFromJSON failed [target_id]"); + goto end; + } source_to_target_data = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "sourceToTargetData"); if (!source_to_target_data) { @@ -273,6 +281,10 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c goto end; } source_to_target_data_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(source_to_target_data); + if (!source_to_target_data_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [source_to_target_data]"); + goto end; + } pdu_session_list = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "pduSessionList"); if (!pdu_session_list) { @@ -295,7 +307,6 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c OpenAPI_n2_sm_information_t *pdu_session_listItem = OpenAPI_n2_sm_information_parseFromJSON(pdu_session_list_local); if (!pdu_session_listItem) { ogs_error("No pdu_session_listItem"); - OpenAPI_list_free(pdu_session_listList); goto end; } OpenAPI_list_add(pdu_session_listList, pdu_session_listItem); @@ -312,16 +323,28 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c ue_radio_capability = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "ueRadioCapability"); if (ue_radio_capability) { ue_radio_capability_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_radio_capability); + if (!ue_radio_capability_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_radio_capability]"); + goto end; + } } ue_radio_capability_for_paging = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "ueRadioCapabilityForPaging"); if (ue_radio_capability_for_paging) { ue_radio_capability_for_paging_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_radio_capability_for_paging); + if (!ue_radio_capability_for_paging_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_radio_capability_for_paging]"); + goto end; + } } ngap_cause = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "ngapCause"); if (ngap_cause) { ngap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ngap_cause); + if (!ngap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ngap_cause]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "supportedFeatures"); @@ -335,6 +358,10 @@ OpenAPI_ue_context_create_data_t *OpenAPI_ue_context_create_data_parseFromJSON(c serving_network = cJSON_GetObjectItemCaseSensitive(ue_context_create_dataJSON, "servingNetwork"); if (serving_network) { serving_network_local_nonprim = OpenAPI_plmn_id_nid_parseFromJSON(serving_network); + if (!serving_network_local_nonprim) { + ogs_error("OpenAPI_plmn_id_nid_parseFromJSON failed [serving_network]"); + goto end; + } } ue_context_create_data_local_var = OpenAPI_ue_context_create_data_create ( diff --git a/lib/sbi/openapi/model/ue_context_create_error.c b/lib/sbi/openapi/model/ue_context_create_error.c index dd877f870..be721f558 100644 --- a/lib/sbi/openapi/model/ue_context_create_error.c +++ b/lib/sbi/openapi/model/ue_context_create_error.c @@ -114,15 +114,27 @@ OpenAPI_ue_context_create_error_t *OpenAPI_ue_context_create_error_parseFromJSON goto end; } error_local_nonprim = OpenAPI_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_problem_details_parseFromJSON failed [error]"); + goto end; + } ngap_cause = cJSON_GetObjectItemCaseSensitive(ue_context_create_errorJSON, "ngapCause"); if (ngap_cause) { ngap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ngap_cause); + if (!ngap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ngap_cause]"); + goto end; + } } target_to_source_failure_data = cJSON_GetObjectItemCaseSensitive(ue_context_create_errorJSON, "targetToSourceFailureData"); if (target_to_source_failure_data) { target_to_source_failure_data_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(target_to_source_failure_data); + if (!target_to_source_failure_data_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [target_to_source_failure_data]"); + goto end; + } } ue_context_create_error_local_var = OpenAPI_ue_context_create_error_create ( diff --git a/lib/sbi/openapi/model/ue_context_created_data.c b/lib/sbi/openapi/model/ue_context_created_data.c index d30f7eebb..a17b6bd9e 100644 --- a/lib/sbi/openapi/model/ue_context_created_data.c +++ b/lib/sbi/openapi/model/ue_context_created_data.c @@ -202,6 +202,10 @@ OpenAPI_ue_context_created_data_t *OpenAPI_ue_context_created_data_parseFromJSON goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } target_to_source_data = cJSON_GetObjectItemCaseSensitive(ue_context_created_dataJSON, "targetToSourceData"); if (!target_to_source_data) { @@ -209,6 +213,10 @@ OpenAPI_ue_context_created_data_t *OpenAPI_ue_context_created_data_parseFromJSON goto end; } target_to_source_data_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(target_to_source_data); + if (!target_to_source_data_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [target_to_source_data]"); + goto end; + } pdu_session_list = cJSON_GetObjectItemCaseSensitive(ue_context_created_dataJSON, "pduSessionList"); if (!pdu_session_list) { @@ -231,7 +239,6 @@ OpenAPI_ue_context_created_data_t *OpenAPI_ue_context_created_data_parseFromJSON OpenAPI_n2_sm_information_t *pdu_session_listItem = OpenAPI_n2_sm_information_parseFromJSON(pdu_session_list_local); if (!pdu_session_listItem) { ogs_error("No pdu_session_listItem"); - OpenAPI_list_free(pdu_session_listList); goto end; } OpenAPI_list_add(pdu_session_listList, pdu_session_listItem); @@ -255,7 +262,6 @@ OpenAPI_ue_context_created_data_t *OpenAPI_ue_context_created_data_parseFromJSON OpenAPI_n2_sm_information_t *failed_session_listItem = OpenAPI_n2_sm_information_parseFromJSON(failed_session_list_local); if (!failed_session_listItem) { ogs_error("No failed_session_listItem"); - OpenAPI_list_free(failed_session_listList); goto end; } OpenAPI_list_add(failed_session_listList, failed_session_listItem); diff --git a/lib/sbi/openapi/model/ue_context_in_amf_data.c b/lib/sbi/openapi/model/ue_context_in_amf_data.c index 434e98a65..f8d1b8168 100644 --- a/lib/sbi/openapi/model/ue_context_in_amf_data.c +++ b/lib/sbi/openapi/model/ue_context_in_amf_data.c @@ -94,6 +94,10 @@ OpenAPI_ue_context_in_amf_data_t *OpenAPI_ue_context_in_amf_data_parseFromJSON(c eps_interworking_info = cJSON_GetObjectItemCaseSensitive(ue_context_in_amf_dataJSON, "epsInterworkingInfo"); if (eps_interworking_info) { eps_interworking_info_local_nonprim = OpenAPI_eps_interworking_info_parseFromJSON(eps_interworking_info); + if (!eps_interworking_info_local_nonprim) { + ogs_error("OpenAPI_eps_interworking_info_parseFromJSON failed [eps_interworking_info]"); + goto end; + } } amf_info = cJSON_GetObjectItemCaseSensitive(ue_context_in_amf_dataJSON, "amfInfo"); @@ -114,7 +118,6 @@ OpenAPI_ue_context_in_amf_data_t *OpenAPI_ue_context_in_amf_data_parseFromJSON(c OpenAPI_nudm_amf_info_t *amf_infoItem = OpenAPI_nudm_amf_info_parseFromJSON(amf_info_local); if (!amf_infoItem) { ogs_error("No amf_infoItem"); - OpenAPI_list_free(amf_infoList); goto end; } OpenAPI_list_add(amf_infoList, amf_infoItem); diff --git a/lib/sbi/openapi/model/ue_context_in_smf_data.c b/lib/sbi/openapi/model/ue_context_in_smf_data.c index dc7bb6c4d..b728ce3b5 100644 --- a/lib/sbi/openapi/model/ue_context_in_smf_data.c +++ b/lib/sbi/openapi/model/ue_context_in_smf_data.c @@ -171,7 +171,6 @@ OpenAPI_ue_context_in_smf_data_t *OpenAPI_ue_context_in_smf_data_parseFromJSON(c OpenAPI_pgw_info_t *pgw_infoItem = OpenAPI_pgw_info_parseFromJSON(pgw_info_local); if (!pgw_infoItem) { ogs_error("No pgw_infoItem"); - OpenAPI_list_free(pgw_infoList); goto end; } OpenAPI_list_add(pgw_infoList, pgw_infoItem); @@ -181,6 +180,10 @@ OpenAPI_ue_context_in_smf_data_t *OpenAPI_ue_context_in_smf_data_parseFromJSON(c emergency_info = cJSON_GetObjectItemCaseSensitive(ue_context_in_smf_dataJSON, "emergencyInfo"); if (emergency_info) { emergency_info_local_nonprim = OpenAPI_emergency_info_parseFromJSON(emergency_info); + if (!emergency_info_local_nonprim) { + ogs_error("OpenAPI_emergency_info_parseFromJSON failed [emergency_info]"); + goto end; + } } ue_context_in_smf_data_local_var = OpenAPI_ue_context_in_smf_data_create ( diff --git a/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter.c b/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter.c index 88f777455..88cb2e546 100644 --- a/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter.c +++ b/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter.c @@ -146,7 +146,6 @@ OpenAPI_ue_context_in_smf_data_sub_filter_t *OpenAPI_ue_context_in_smf_data_sub_ OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); diff --git a/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter_1.c b/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter_1.c index 894d36312..9387ada52 100644 --- a/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter_1.c +++ b/lib/sbi/openapi/model/ue_context_in_smf_data_sub_filter_1.c @@ -146,7 +146,6 @@ OpenAPI_ue_context_in_smf_data_sub_filter_1_t *OpenAPI_ue_context_in_smf_data_su OpenAPI_snssai_t *snssai_listItem = OpenAPI_snssai_parseFromJSON(snssai_list_local); if (!snssai_listItem) { ogs_error("No snssai_listItem"); - OpenAPI_list_free(snssai_listList); goto end; } OpenAPI_list_add(snssai_listList, snssai_listItem); diff --git a/lib/sbi/openapi/model/ue_context_in_smsf_data.c b/lib/sbi/openapi/model/ue_context_in_smsf_data.c index a39c44563..cadb96ee9 100644 --- a/lib/sbi/openapi/model/ue_context_in_smsf_data.c +++ b/lib/sbi/openapi/model/ue_context_in_smsf_data.c @@ -88,11 +88,19 @@ OpenAPI_ue_context_in_smsf_data_t *OpenAPI_ue_context_in_smsf_data_parseFromJSON smsf_info3_gpp_access = cJSON_GetObjectItemCaseSensitive(ue_context_in_smsf_dataJSON, "smsfInfo3GppAccess"); if (smsf_info3_gpp_access) { smsf_info3_gpp_access_local_nonprim = OpenAPI_smsf_info_parseFromJSON(smsf_info3_gpp_access); + if (!smsf_info3_gpp_access_local_nonprim) { + ogs_error("OpenAPI_smsf_info_parseFromJSON failed [smsf_info3_gpp_access]"); + goto end; + } } smsf_info_non3_gpp_access = cJSON_GetObjectItemCaseSensitive(ue_context_in_smsf_dataJSON, "smsfInfoNon3GppAccess"); if (smsf_info_non3_gpp_access) { smsf_info_non3_gpp_access_local_nonprim = OpenAPI_smsf_info_parseFromJSON(smsf_info_non3_gpp_access); + if (!smsf_info_non3_gpp_access_local_nonprim) { + ogs_error("OpenAPI_smsf_info_parseFromJSON failed [smsf_info_non3_gpp_access]"); + goto end; + } } ue_context_in_smsf_data_local_var = OpenAPI_ue_context_in_smsf_data_create ( diff --git a/lib/sbi/openapi/model/ue_context_release.c b/lib/sbi/openapi/model/ue_context_release.c index 04a181dc1..7d8e4659a 100644 --- a/lib/sbi/openapi/model/ue_context_release.c +++ b/lib/sbi/openapi/model/ue_context_release.c @@ -114,6 +114,10 @@ OpenAPI_ue_context_release_t *OpenAPI_ue_context_release_parseFromJSON(cJSON *ue goto end; } ngap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ngap_cause); + if (!ngap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ngap_cause]"); + goto end; + } ue_context_release_local_var = OpenAPI_ue_context_release_create ( supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL, diff --git a/lib/sbi/openapi/model/ue_context_relocate_data.c b/lib/sbi/openapi/model/ue_context_relocate_data.c index db689af08..abd559ea4 100644 --- a/lib/sbi/openapi/model/ue_context_relocate_data.c +++ b/lib/sbi/openapi/model/ue_context_relocate_data.c @@ -224,6 +224,10 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } target_id = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "targetId"); if (!target_id) { @@ -231,6 +235,10 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS goto end; } target_id_local_nonprim = OpenAPI_ng_ran_target_id_parseFromJSON(target_id); + if (!target_id_local_nonprim) { + ogs_error("OpenAPI_ng_ran_target_id_parseFromJSON failed [target_id]"); + goto end; + } source_to_target_data = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "sourceToTargetData"); if (!source_to_target_data) { @@ -238,6 +246,10 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS goto end; } source_to_target_data_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(source_to_target_data); + if (!source_to_target_data_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [source_to_target_data]"); + goto end; + } forward_relocation_request = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "forwardRelocationRequest"); if (!forward_relocation_request) { @@ -245,6 +257,10 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS goto end; } forward_relocation_request_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(forward_relocation_request); + if (!forward_relocation_request_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [forward_relocation_request]"); + goto end; + } pdu_session_list = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "pduSessionList"); if (pdu_session_list) { @@ -264,7 +280,6 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS OpenAPI_n2_sm_information_t *pdu_session_listItem = OpenAPI_n2_sm_information_parseFromJSON(pdu_session_list_local); if (!pdu_session_listItem) { ogs_error("No pdu_session_listItem"); - OpenAPI_list_free(pdu_session_listList); goto end; } OpenAPI_list_add(pdu_session_listList, pdu_session_listItem); @@ -274,11 +289,19 @@ OpenAPI_ue_context_relocate_data_t *OpenAPI_ue_context_relocate_data_parseFromJS ue_radio_capability = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "ueRadioCapability"); if (ue_radio_capability) { ue_radio_capability_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_radio_capability); + if (!ue_radio_capability_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_radio_capability]"); + goto end; + } } ngap_cause = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "ngapCause"); if (ngap_cause) { ngap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ngap_cause); + if (!ngap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ngap_cause]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ue_context_relocate_dataJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/ue_context_relocated_data.c b/lib/sbi/openapi/model/ue_context_relocated_data.c index ffb26280b..137740003 100644 --- a/lib/sbi/openapi/model/ue_context_relocated_data.c +++ b/lib/sbi/openapi/model/ue_context_relocated_data.c @@ -72,6 +72,10 @@ OpenAPI_ue_context_relocated_data_t *OpenAPI_ue_context_relocated_data_parseFrom goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } ue_context_relocated_data_local_var = OpenAPI_ue_context_relocated_data_create ( ue_context_local_nonprim diff --git a/lib/sbi/openapi/model/ue_context_transfer_200_response.c b/lib/sbi/openapi/model/ue_context_transfer_200_response.c index d2c20737c..5a17f6c64 100644 --- a/lib/sbi/openapi/model/ue_context_transfer_200_response.c +++ b/lib/sbi/openapi/model/ue_context_transfer_200_response.c @@ -118,6 +118,10 @@ OpenAPI_ue_context_transfer_200_response_t *OpenAPI_ue_context_transfer_200_resp json_data = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_200_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_transfer_rsp_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_transfer_rsp_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n2_information = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_200_responseJSON, "binaryDataN2Information"); diff --git a/lib/sbi/openapi/model/ue_context_transfer_req_data.c b/lib/sbi/openapi/model/ue_context_transfer_req_data.c index cc3134bb6..e92219d66 100644 --- a/lib/sbi/openapi/model/ue_context_transfer_req_data.c +++ b/lib/sbi/openapi/model/ue_context_transfer_req_data.c @@ -150,11 +150,19 @@ OpenAPI_ue_context_transfer_req_data_t *OpenAPI_ue_context_transfer_req_data_par plmn_id = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_req_dataJSON, "plmnId"); if (plmn_id) { plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id); + if (!plmn_id_local_nonprim) { + ogs_error("OpenAPI_plmn_id_parseFromJSON failed [plmn_id]"); + goto end; + } } reg_request = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_req_dataJSON, "regRequest"); if (reg_request) { reg_request_local_nonprim = OpenAPI_n1_message_container_parseFromJSON(reg_request); + if (!reg_request_local_nonprim) { + ogs_error("OpenAPI_n1_message_container_parseFromJSON failed [reg_request]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_req_dataJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/ue_context_transfer_request.c b/lib/sbi/openapi/model/ue_context_transfer_request.c index bc0dc2ce6..21948ec67 100644 --- a/lib/sbi/openapi/model/ue_context_transfer_request.c +++ b/lib/sbi/openapi/model/ue_context_transfer_request.c @@ -84,6 +84,10 @@ OpenAPI_ue_context_transfer_request_t *OpenAPI_ue_context_transfer_request_parse json_data = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_ue_context_transfer_req_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_ue_context_transfer_req_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_message = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_requestJSON, "binaryDataN1Message"); diff --git a/lib/sbi/openapi/model/ue_context_transfer_rsp_data.c b/lib/sbi/openapi/model/ue_context_transfer_rsp_data.c index 994776a0e..d5ce19573 100644 --- a/lib/sbi/openapi/model/ue_context_transfer_rsp_data.c +++ b/lib/sbi/openapi/model/ue_context_transfer_rsp_data.c @@ -149,20 +149,36 @@ OpenAPI_ue_context_transfer_rsp_data_t *OpenAPI_ue_context_transfer_rsp_data_par goto end; } ue_context_local_nonprim = OpenAPI_ue_context_parseFromJSON(ue_context); + if (!ue_context_local_nonprim) { + ogs_error("OpenAPI_ue_context_parseFromJSON failed [ue_context]"); + goto end; + } ue_radio_capability = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_rsp_dataJSON, "ueRadioCapability"); if (ue_radio_capability) { ue_radio_capability_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_radio_capability); + if (!ue_radio_capability_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_radio_capability]"); + goto end; + } } ue_radio_capability_for_paging = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_rsp_dataJSON, "ueRadioCapabilityForPaging"); if (ue_radio_capability_for_paging) { ue_radio_capability_for_paging_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_radio_capability_for_paging); + if (!ue_radio_capability_for_paging_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_radio_capability_for_paging]"); + goto end; + } } ue_nbiot_radio_capability = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_rsp_dataJSON, "ueNbiotRadioCapability"); if (ue_nbiot_radio_capability) { ue_nbiot_radio_capability_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(ue_nbiot_radio_capability); + if (!ue_nbiot_radio_capability_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [ue_nbiot_radio_capability]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(ue_context_transfer_rsp_dataJSON, "supportedFeatures"); diff --git a/lib/sbi/openapi/model/ue_differentiation_info.c b/lib/sbi/openapi/model/ue_differentiation_info.c index 26f945b76..cc4e6deae 100644 --- a/lib/sbi/openapi/model/ue_differentiation_info.c +++ b/lib/sbi/openapi/model/ue_differentiation_info.c @@ -164,6 +164,10 @@ OpenAPI_ue_differentiation_info_t *OpenAPI_ue_differentiation_info_parseFromJSON scheduled_com_time = cJSON_GetObjectItemCaseSensitive(ue_differentiation_infoJSON, "scheduledComTime"); if (scheduled_com_time) { scheduled_com_time_local_nonprim = OpenAPI_scheduled_communication_time_parseFromJSON(scheduled_com_time); + if (!scheduled_com_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_parseFromJSON failed [scheduled_com_time]"); + goto end; + } } stationary_ind = cJSON_GetObjectItemCaseSensitive(ue_differentiation_infoJSON, "stationaryInd"); @@ -187,6 +191,10 @@ OpenAPI_ue_differentiation_info_t *OpenAPI_ue_differentiation_info_parseFromJSON battery_ind = cJSON_GetObjectItemCaseSensitive(ue_differentiation_infoJSON, "batteryInd"); if (battery_ind) { battery_ind_local_nonprim = OpenAPI_battery_indication_parseFromJSON(battery_ind); + if (!battery_ind_local_nonprim) { + ogs_error("OpenAPI_battery_indication_parseFromJSON failed [battery_ind]"); + goto end; + } } validity_time = cJSON_GetObjectItemCaseSensitive(ue_differentiation_infoJSON, "validityTime"); diff --git a/lib/sbi/openapi/model/ue_in_area_filter.c b/lib/sbi/openapi/model/ue_in_area_filter.c index bdb3206b4..1087ce395 100644 --- a/lib/sbi/openapi/model/ue_in_area_filter.c +++ b/lib/sbi/openapi/model/ue_in_area_filter.c @@ -79,6 +79,10 @@ OpenAPI_ue_in_area_filter_t *OpenAPI_ue_in_area_filter_parseFromJSON(cJSON *ue_i ue_type = cJSON_GetObjectItemCaseSensitive(ue_in_area_filterJSON, "ueType"); if (ue_type) { ue_type_local_nonprim = OpenAPI_ue_type_parseFromJSON(ue_type); + if (!ue_type_local_nonprim) { + ogs_error("OpenAPI_ue_type_parseFromJSON failed [ue_type]"); + goto end; + } } aerial_srv_dnn_ind = cJSON_GetObjectItemCaseSensitive(ue_in_area_filterJSON, "aerialSrvDnnInd"); diff --git a/lib/sbi/openapi/model/ue_initiated_resource_request.c b/lib/sbi/openapi/model/ue_initiated_resource_request.c index 683cdab97..c190cdddc 100644 --- a/lib/sbi/openapi/model/ue_initiated_resource_request.c +++ b/lib/sbi/openapi/model/ue_initiated_resource_request.c @@ -180,7 +180,6 @@ OpenAPI_ue_initiated_resource_request_t *OpenAPI_ue_initiated_resource_request_p OpenAPI_packet_filter_info_t *pack_filt_infoItem = OpenAPI_packet_filter_info_parseFromJSON(pack_filt_info_local); if (!pack_filt_infoItem) { ogs_error("No pack_filt_infoItem"); - OpenAPI_list_free(pack_filt_infoList); goto end; } OpenAPI_list_add(pack_filt_infoList, pack_filt_infoItem); @@ -189,6 +188,10 @@ OpenAPI_ue_initiated_resource_request_t *OpenAPI_ue_initiated_resource_request_p req_qos = cJSON_GetObjectItemCaseSensitive(ue_initiated_resource_requestJSON, "reqQos"); if (req_qos) { req_qos_local_nonprim = OpenAPI_requested_qos_parseFromJSON(req_qos); + if (!req_qos_local_nonprim) { + ogs_error("OpenAPI_requested_qos_parseFromJSON failed [req_qos]"); + goto end; + } } ue_initiated_resource_request_local_var = OpenAPI_ue_initiated_resource_request_create ( diff --git a/lib/sbi/openapi/model/ue_mobility.c b/lib/sbi/openapi/model/ue_mobility.c index 612807444..3bbef0564 100644 --- a/lib/sbi/openapi/model/ue_mobility.c +++ b/lib/sbi/openapi/model/ue_mobility.c @@ -140,6 +140,10 @@ OpenAPI_ue_mobility_t *OpenAPI_ue_mobility_parseFromJSON(cJSON *ue_mobilityJSON) recurring_time = cJSON_GetObjectItemCaseSensitive(ue_mobilityJSON, "recurringTime"); if (recurring_time) { recurring_time_local_nonprim = OpenAPI_scheduled_communication_time_1_parseFromJSON(recurring_time); + if (!recurring_time_local_nonprim) { + ogs_error("OpenAPI_scheduled_communication_time_1_parseFromJSON failed [recurring_time]"); + goto end; + } } duration = cJSON_GetObjectItemCaseSensitive(ue_mobilityJSON, "duration"); @@ -176,7 +180,6 @@ OpenAPI_ue_mobility_t *OpenAPI_ue_mobility_parseFromJSON(cJSON *ue_mobilityJSON) OpenAPI_location_info_t *loc_infosItem = OpenAPI_location_info_parseFromJSON(loc_infos_local); if (!loc_infosItem) { ogs_error("No loc_infosItem"); - OpenAPI_list_free(loc_infosList); goto end; } OpenAPI_list_add(loc_infosList, loc_infosItem); diff --git a/lib/sbi/openapi/model/ue_n1_n2_info_subscription_create_data.c b/lib/sbi/openapi/model/ue_n1_n2_info_subscription_create_data.c index 3f2555a27..d8a6e03b5 100644 --- a/lib/sbi/openapi/model/ue_n1_n2_info_subscription_create_data.c +++ b/lib/sbi/openapi/model/ue_n1_n2_info_subscription_create_data.c @@ -195,6 +195,10 @@ OpenAPI_ue_n1_n2_info_subscription_create_data_t *OpenAPI_ue_n1_n2_info_subscrip old_guami = cJSON_GetObjectItemCaseSensitive(ue_n1_n2_info_subscription_create_dataJSON, "oldGuami"); if (old_guami) { old_guami_local_nonprim = OpenAPI_guami_parseFromJSON(old_guami); + if (!old_guami_local_nonprim) { + ogs_error("OpenAPI_guami_parseFromJSON failed [old_guami]"); + goto end; + } } ue_n1_n2_info_subscription_create_data_local_var = OpenAPI_ue_n1_n2_info_subscription_create_data_create ( diff --git a/lib/sbi/openapi/model/ue_reg_status_update_req_data.c b/lib/sbi/openapi/model/ue_reg_status_update_req_data.c index 3c86604ae..bf8e2f30b 100644 --- a/lib/sbi/openapi/model/ue_reg_status_update_req_data.c +++ b/lib/sbi/openapi/model/ue_reg_status_update_req_data.c @@ -236,7 +236,6 @@ OpenAPI_ue_reg_status_update_req_data_t *OpenAPI_ue_reg_status_update_req_data_p OpenAPI_smf_change_info_t *smf_change_info_listItem = OpenAPI_smf_change_info_parseFromJSON(smf_change_info_list_local); if (!smf_change_info_listItem) { ogs_error("No smf_change_info_listItem"); - OpenAPI_list_free(smf_change_info_listList); goto end; } OpenAPI_list_add(smf_change_info_listList, smf_change_info_listItem); @@ -282,7 +281,6 @@ OpenAPI_ue_reg_status_update_req_data_t *OpenAPI_ue_reg_status_update_req_data_p OpenAPI_release_session_info_t *to_release_session_infoItem = OpenAPI_release_session_info_parseFromJSON(to_release_session_info_local); if (!to_release_session_infoItem) { ogs_error("No to_release_session_infoItem"); - OpenAPI_list_free(to_release_session_infoList); goto end; } OpenAPI_list_add(to_release_session_infoList, to_release_session_infoItem); diff --git a/lib/sbi/openapi/model/ue_slice_mbr.c b/lib/sbi/openapi/model/ue_slice_mbr.c index dd00c77dc..624a68210 100644 --- a/lib/sbi/openapi/model/ue_slice_mbr.c +++ b/lib/sbi/openapi/model/ue_slice_mbr.c @@ -159,10 +159,18 @@ OpenAPI_ue_slice_mbr_t *OpenAPI_ue_slice_mbr_parseFromJSON(cJSON *ue_slice_mbrJS goto end; } serving_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(serving_snssai); + if (!serving_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [serving_snssai]"); + goto end; + } mapped_home_snssai = cJSON_GetObjectItemCaseSensitive(ue_slice_mbrJSON, "mappedHomeSnssai"); if (mapped_home_snssai) { mapped_home_snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(mapped_home_snssai); + if (!mapped_home_snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [mapped_home_snssai]"); + goto end; + } } ue_slice_mbr_local_var = OpenAPI_ue_slice_mbr_create ( diff --git a/lib/sbi/openapi/model/un_trust_af_info.c b/lib/sbi/openapi/model/un_trust_af_info.c index e9815146d..51b6503f2 100644 --- a/lib/sbi/openapi/model/un_trust_af_info.c +++ b/lib/sbi/openapi/model/un_trust_af_info.c @@ -126,7 +126,6 @@ OpenAPI_un_trust_af_info_t *OpenAPI_un_trust_af_info_parseFromJSON(cJSON *un_tru OpenAPI_snssai_info_item_t *s_nssai_info_listItem = OpenAPI_snssai_info_item_parseFromJSON(s_nssai_info_list_local); if (!s_nssai_info_listItem) { ogs_error("No s_nssai_info_listItem"); - OpenAPI_list_free(s_nssai_info_listList); goto end; } OpenAPI_list_add(s_nssai_info_listList, s_nssai_info_listItem); diff --git a/lib/sbi/openapi/model/unrelated_class.c b/lib/sbi/openapi/model/unrelated_class.c index d403a8513..0f45fa5f2 100644 --- a/lib/sbi/openapi/model/unrelated_class.c +++ b/lib/sbi/openapi/model/unrelated_class.c @@ -120,10 +120,18 @@ OpenAPI_unrelated_class_t *OpenAPI_unrelated_class_parseFromJSON(cJSON *unrelate goto end; } default_unrelated_class_local_nonprim = OpenAPI_default_unrelated_class_parseFromJSON(default_unrelated_class); + if (!default_unrelated_class_local_nonprim) { + ogs_error("OpenAPI_default_unrelated_class_parseFromJSON failed [default_unrelated_class]"); + goto end; + } external_unrelated_class = cJSON_GetObjectItemCaseSensitive(unrelated_classJSON, "externalUnrelatedClass"); if (external_unrelated_class) { external_unrelated_class_local_nonprim = OpenAPI_external_unrelated_class_parseFromJSON(external_unrelated_class); + if (!external_unrelated_class_local_nonprim) { + ogs_error("OpenAPI_external_unrelated_class_parseFromJSON failed [external_unrelated_class]"); + goto end; + } } service_type_unrelated_classes = cJSON_GetObjectItemCaseSensitive(unrelated_classJSON, "serviceTypeUnrelatedClasses"); @@ -144,7 +152,6 @@ OpenAPI_unrelated_class_t *OpenAPI_unrelated_class_parseFromJSON(cJSON *unrelate OpenAPI_service_type_unrelated_class_t *service_type_unrelated_classesItem = OpenAPI_service_type_unrelated_class_parseFromJSON(service_type_unrelated_classes_local); if (!service_type_unrelated_classesItem) { ogs_error("No service_type_unrelated_classesItem"); - OpenAPI_list_free(service_type_unrelated_classesList); goto end; } OpenAPI_list_add(service_type_unrelated_classesList, service_type_unrelated_classesItem); diff --git a/lib/sbi/openapi/model/up_security_info.c b/lib/sbi/openapi/model/up_security_info.c index a0c802c40..8b807b090 100644 --- a/lib/sbi/openapi/model/up_security_info.c +++ b/lib/sbi/openapi/model/up_security_info.c @@ -115,6 +115,10 @@ OpenAPI_up_security_info_t *OpenAPI_up_security_info_parseFromJSON(cJSON *up_sec goto end; } up_security_local_nonprim = OpenAPI_up_security_parseFromJSON(up_security); + if (!up_security_local_nonprim) { + ogs_error("OpenAPI_up_security_parseFromJSON failed [up_security]"); + goto end; + } max_integrity_protected_data_rate_ul = cJSON_GetObjectItemCaseSensitive(up_security_infoJSON, "maxIntegrityProtectedDataRateUl"); if (max_integrity_protected_data_rate_ul) { @@ -137,6 +141,10 @@ OpenAPI_up_security_info_t *OpenAPI_up_security_info_parseFromJSON(cJSON *up_sec security_result = cJSON_GetObjectItemCaseSensitive(up_security_infoJSON, "securityResult"); if (security_result) { security_result_local_nonprim = OpenAPI_security_result_parseFromJSON(security_result); + if (!security_result_local_nonprim) { + ogs_error("OpenAPI_security_result_parseFromJSON failed [security_result]"); + goto end; + } } up_security_info_local_var = OpenAPI_up_security_info_create ( diff --git a/lib/sbi/openapi/model/update_nwdaf_registration_200_response.c b/lib/sbi/openapi/model/update_nwdaf_registration_200_response.c index 786deaf88..ec18bdba4 100644 --- a/lib/sbi/openapi/model/update_nwdaf_registration_200_response.c +++ b/lib/sbi/openapi/model/update_nwdaf_registration_200_response.c @@ -236,7 +236,6 @@ OpenAPI_update_nwdaf_registration_200_response_t *OpenAPI_update_nwdaf_registrat OpenAPI_event_id_t *analytics_idsItem = OpenAPI_event_id_parseFromJSON(analytics_ids_local); if (!analytics_idsItem) { ogs_error("No analytics_idsItem"); - OpenAPI_list_free(analytics_idsList); goto end; } OpenAPI_list_add(analytics_idsList, analytics_idsItem); @@ -261,6 +260,10 @@ OpenAPI_update_nwdaf_registration_200_response_t *OpenAPI_update_nwdaf_registrat context_info = cJSON_GetObjectItemCaseSensitive(update_nwdaf_registration_200_responseJSON, "contextInfo"); if (context_info) { context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info); + if (!context_info_local_nonprim) { + ogs_error("OpenAPI_context_info_parseFromJSON failed [context_info]"); + goto end; + } } supported_features = cJSON_GetObjectItemCaseSensitive(update_nwdaf_registration_200_responseJSON, "supportedFeatures"); @@ -313,7 +316,6 @@ OpenAPI_update_nwdaf_registration_200_response_t *OpenAPI_update_nwdaf_registrat OpenAPI_report_item_t *reportItem = OpenAPI_report_item_parseFromJSON(report_local); if (!reportItem) { ogs_error("No reportItem"); - OpenAPI_list_free(reportList); goto end; } OpenAPI_list_add(reportList, reportItem); diff --git a/lib/sbi/openapi/model/update_pdu_session_200_response.c b/lib/sbi/openapi/model/update_pdu_session_200_response.c index 1bdbeb22c..38ee01774 100644 --- a/lib/sbi/openapi/model/update_pdu_session_200_response.c +++ b/lib/sbi/openapi/model/update_pdu_session_200_response.c @@ -135,6 +135,10 @@ OpenAPI_update_pdu_session_200_response_t *OpenAPI_update_pdu_session_200_respon json_data = cJSON_GetObjectItemCaseSensitive(update_pdu_session_200_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_hsmf_updated_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_hsmf_updated_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(update_pdu_session_200_responseJSON, "binaryDataN1SmInfoToUe"); diff --git a/lib/sbi/openapi/model/update_pdu_session_400_response.c b/lib/sbi/openapi/model/update_pdu_session_400_response.c index 91700b1bd..88d5077df 100644 --- a/lib/sbi/openapi/model/update_pdu_session_400_response.c +++ b/lib/sbi/openapi/model/update_pdu_session_400_response.c @@ -84,6 +84,10 @@ OpenAPI_update_pdu_session_400_response_t *OpenAPI_update_pdu_session_400_respon json_data = cJSON_GetObjectItemCaseSensitive(update_pdu_session_400_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_hsmf_update_error_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_hsmf_update_error_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(update_pdu_session_400_responseJSON, "binaryDataN1SmInfoToUe"); diff --git a/lib/sbi/openapi/model/update_pdu_session_request.c b/lib/sbi/openapi/model/update_pdu_session_request.c index 484ffbf03..e09386c1f 100644 --- a/lib/sbi/openapi/model/update_pdu_session_request.c +++ b/lib/sbi/openapi/model/update_pdu_session_request.c @@ -152,6 +152,10 @@ OpenAPI_update_pdu_session_request_t *OpenAPI_update_pdu_session_request_parseFr json_data = cJSON_GetObjectItemCaseSensitive(update_pdu_session_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_hsmf_update_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_hsmf_update_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_info_from_ue = cJSON_GetObjectItemCaseSensitive(update_pdu_session_requestJSON, "binaryDataN1SmInfoFromUe"); diff --git a/lib/sbi/openapi/model/update_sm_context_200_response.c b/lib/sbi/openapi/model/update_sm_context_200_response.c index 460ed539a..b9a86a0fd 100644 --- a/lib/sbi/openapi/model/update_sm_context_200_response.c +++ b/lib/sbi/openapi/model/update_sm_context_200_response.c @@ -101,6 +101,10 @@ OpenAPI_update_sm_context_200_response_t *OpenAPI_update_sm_context_200_response json_data = cJSON_GetObjectItemCaseSensitive(update_sm_context_200_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_sm_context_updated_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_sm_context_updated_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_message = cJSON_GetObjectItemCaseSensitive(update_sm_context_200_responseJSON, "binaryDataN1SmMessage"); diff --git a/lib/sbi/openapi/model/update_sm_context_400_response.c b/lib/sbi/openapi/model/update_sm_context_400_response.c index 24af9e77a..156ad1612 100644 --- a/lib/sbi/openapi/model/update_sm_context_400_response.c +++ b/lib/sbi/openapi/model/update_sm_context_400_response.c @@ -101,6 +101,10 @@ OpenAPI_update_sm_context_400_response_t *OpenAPI_update_sm_context_400_response json_data = cJSON_GetObjectItemCaseSensitive(update_sm_context_400_responseJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_sm_context_update_error_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_sm_context_update_error_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_message = cJSON_GetObjectItemCaseSensitive(update_sm_context_400_responseJSON, "binaryDataN1SmMessage"); diff --git a/lib/sbi/openapi/model/update_sm_context_request.c b/lib/sbi/openapi/model/update_sm_context_request.c index 000ee3579..52e158139 100644 --- a/lib/sbi/openapi/model/update_sm_context_request.c +++ b/lib/sbi/openapi/model/update_sm_context_request.c @@ -118,6 +118,10 @@ OpenAPI_update_sm_context_request_t *OpenAPI_update_sm_context_request_parseFrom json_data = cJSON_GetObjectItemCaseSensitive(update_sm_context_requestJSON, "jsonData"); if (json_data) { json_data_local_nonprim = OpenAPI_sm_context_update_data_parseFromJSON(json_data); + if (!json_data_local_nonprim) { + ogs_error("OpenAPI_sm_context_update_data_parseFromJSON failed [json_data]"); + goto end; + } } binary_data_n1_sm_message = cJSON_GetObjectItemCaseSensitive(update_sm_context_requestJSON, "binaryDataN1SmMessage"); diff --git a/lib/sbi/openapi/model/upf_cond.c b/lib/sbi/openapi/model/upf_cond.c index a41077255..ca4311072 100644 --- a/lib/sbi/openapi/model/upf_cond.c +++ b/lib/sbi/openapi/model/upf_cond.c @@ -181,7 +181,6 @@ OpenAPI_upf_cond_t *OpenAPI_upf_cond_parseFromJSON(cJSON *upf_condJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); diff --git a/lib/sbi/openapi/model/upf_info.c b/lib/sbi/openapi/model/upf_info.c index bac446a60..3b350874a 100644 --- a/lib/sbi/openapi/model/upf_info.c +++ b/lib/sbi/openapi/model/upf_info.c @@ -391,7 +391,6 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) OpenAPI_snssai_upf_info_item_t *s_nssai_upf_info_listItem = OpenAPI_snssai_upf_info_item_parseFromJSON(s_nssai_upf_info_list_local); if (!s_nssai_upf_info_listItem) { ogs_error("No s_nssai_upf_info_listItem"); - OpenAPI_list_free(s_nssai_upf_info_listList); goto end; } OpenAPI_list_add(s_nssai_upf_info_listList, s_nssai_upf_info_listItem); @@ -436,7 +435,6 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) OpenAPI_interface_upf_info_item_t *interface_upf_info_listItem = OpenAPI_interface_upf_info_item_parseFromJSON(interface_upf_info_list_local); if (!interface_upf_info_listItem) { ogs_error("No interface_upf_info_listItem"); - OpenAPI_list_free(interface_upf_info_listList); goto end; } OpenAPI_list_add(interface_upf_info_listList, interface_upf_info_listItem); @@ -473,6 +471,10 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) atsss_capability = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "atsssCapability"); if (atsss_capability) { atsss_capability_local_nonprim = OpenAPI_atsss_capability_parseFromJSON(atsss_capability); + if (!atsss_capability_local_nonprim) { + ogs_error("OpenAPI_atsss_capability_parseFromJSON failed [atsss_capability]"); + goto end; + } } ue_ip_addr_ind = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "ueIpAddrInd"); @@ -501,7 +503,6 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local); if (!tai_listItem) { ogs_error("No tai_listItem"); - OpenAPI_list_free(tai_listList); goto end; } OpenAPI_list_add(tai_listList, tai_listItem); @@ -526,7 +527,6 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local); if (!tai_range_listItem) { ogs_error("No tai_range_listItem"); - OpenAPI_list_free(tai_range_listList); goto end; } OpenAPI_list_add(tai_range_listList, tai_range_listItem); @@ -536,16 +536,28 @@ OpenAPI_upf_info_t *OpenAPI_upf_info_parseFromJSON(cJSON *upf_infoJSON) w_agf_info = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "wAgfInfo"); if (w_agf_info) { w_agf_info_local_nonprim = OpenAPI_w_agf_info_parseFromJSON(w_agf_info); + if (!w_agf_info_local_nonprim) { + ogs_error("OpenAPI_w_agf_info_parseFromJSON failed [w_agf_info]"); + goto end; + } } tngf_info = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "tngfInfo"); if (tngf_info) { tngf_info_local_nonprim = OpenAPI_tngf_info_parseFromJSON(tngf_info); + if (!tngf_info_local_nonprim) { + ogs_error("OpenAPI_tngf_info_parseFromJSON failed [tngf_info]"); + goto end; + } } twif_info = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "twifInfo"); if (twif_info) { twif_info_local_nonprim = OpenAPI_twif_info_parseFromJSON(twif_info); + if (!twif_info_local_nonprim) { + ogs_error("OpenAPI_twif_info_parseFromJSON failed [twif_info]"); + goto end; + } } priority = cJSON_GetObjectItemCaseSensitive(upf_infoJSON, "priority"); diff --git a/lib/sbi/openapi/model/upf_information.c b/lib/sbi/openapi/model/upf_information.c index c91b8d4b1..a62fbfa91 100644 --- a/lib/sbi/openapi/model/upf_information.c +++ b/lib/sbi/openapi/model/upf_information.c @@ -89,6 +89,10 @@ OpenAPI_upf_information_t *OpenAPI_upf_information_parseFromJSON(cJSON *upf_info upf_addr = cJSON_GetObjectItemCaseSensitive(upf_informationJSON, "upfAddr"); if (upf_addr) { upf_addr_local_nonprim = OpenAPI_addr_fqdn_parseFromJSON(upf_addr); + if (!upf_addr_local_nonprim) { + ogs_error("OpenAPI_addr_fqdn_parseFromJSON failed [upf_addr]"); + goto end; + } } upf_information_local_var = OpenAPI_upf_information_create ( diff --git a/lib/sbi/openapi/model/upu_data.c b/lib/sbi/openapi/model/upu_data.c index ad65e9b8d..682135682 100644 --- a/lib/sbi/openapi/model/upu_data.c +++ b/lib/sbi/openapi/model/upu_data.c @@ -124,7 +124,6 @@ OpenAPI_upu_data_t *OpenAPI_upu_data_parseFromJSON(cJSON *upu_dataJSON) OpenAPI_snssai_t *default_conf_nssaiItem = OpenAPI_snssai_parseFromJSON(default_conf_nssai_local); if (!default_conf_nssaiItem) { ogs_error("No default_conf_nssaiItem"); - OpenAPI_list_free(default_conf_nssaiList); goto end; } OpenAPI_list_add(default_conf_nssaiList, default_conf_nssaiItem); diff --git a/lib/sbi/openapi/model/upu_data_1.c b/lib/sbi/openapi/model/upu_data_1.c index 0ac188302..d79de3a14 100644 --- a/lib/sbi/openapi/model/upu_data_1.c +++ b/lib/sbi/openapi/model/upu_data_1.c @@ -124,7 +124,6 @@ OpenAPI_upu_data_1_t *OpenAPI_upu_data_1_parseFromJSON(cJSON *upu_data_1JSON) OpenAPI_snssai_t *default_conf_nssaiItem = OpenAPI_snssai_parseFromJSON(default_conf_nssai_local); if (!default_conf_nssaiItem) { ogs_error("No default_conf_nssaiItem"); - OpenAPI_list_free(default_conf_nssaiList); goto end; } OpenAPI_list_add(default_conf_nssaiList, default_conf_nssaiItem); diff --git a/lib/sbi/openapi/model/upu_data_2.c b/lib/sbi/openapi/model/upu_data_2.c index 0fa07efff..fd868e4d6 100644 --- a/lib/sbi/openapi/model/upu_data_2.c +++ b/lib/sbi/openapi/model/upu_data_2.c @@ -124,7 +124,6 @@ OpenAPI_upu_data_2_t *OpenAPI_upu_data_2_parseFromJSON(cJSON *upu_data_2JSON) OpenAPI_snssai_t *default_conf_nssaiItem = OpenAPI_snssai_parseFromJSON(default_conf_nssai_local); if (!default_conf_nssaiItem) { ogs_error("No default_conf_nssaiItem"); - OpenAPI_list_free(default_conf_nssaiList); goto end; } OpenAPI_list_add(default_conf_nssaiList, default_conf_nssaiItem); diff --git a/lib/sbi/openapi/model/upu_info.c b/lib/sbi/openapi/model/upu_info.c index d7bf471ee..e09815387 100644 --- a/lib/sbi/openapi/model/upu_info.c +++ b/lib/sbi/openapi/model/upu_info.c @@ -170,7 +170,6 @@ OpenAPI_upu_info_t *OpenAPI_upu_info_parseFromJSON(cJSON *upu_infoJSON) OpenAPI_upu_data_t *upu_data_listItem = OpenAPI_upu_data_parseFromJSON(upu_data_list_local); if (!upu_data_listItem) { ogs_error("No upu_data_listItem"); - OpenAPI_list_free(upu_data_listList); goto end; } OpenAPI_list_add(upu_data_listList, upu_data_listItem); diff --git a/lib/sbi/openapi/model/upu_info_1.c b/lib/sbi/openapi/model/upu_info_1.c index 7084b992a..e577c9e0c 100644 --- a/lib/sbi/openapi/model/upu_info_1.c +++ b/lib/sbi/openapi/model/upu_info_1.c @@ -170,7 +170,6 @@ OpenAPI_upu_info_1_t *OpenAPI_upu_info_1_parseFromJSON(cJSON *upu_info_1JSON) OpenAPI_upu_data_2_t *upu_data_listItem = OpenAPI_upu_data_2_parseFromJSON(upu_data_list_local); if (!upu_data_listItem) { ogs_error("No upu_data_listItem"); - OpenAPI_list_free(upu_data_listList); goto end; } OpenAPI_list_add(upu_data_listList, upu_data_listItem); diff --git a/lib/sbi/openapi/model/ursp_rule_request.c b/lib/sbi/openapi/model/ursp_rule_request.c index 12169fc05..4d5cf31e4 100644 --- a/lib/sbi/openapi/model/ursp_rule_request.c +++ b/lib/sbi/openapi/model/ursp_rule_request.c @@ -106,6 +106,10 @@ OpenAPI_ursp_rule_request_t *OpenAPI_ursp_rule_request_parseFromJSON(cJSON *ursp traffic_desc = cJSON_GetObjectItemCaseSensitive(ursp_rule_requestJSON, "trafficDesc"); if (traffic_desc) { traffic_desc_local_nonprim = OpenAPI_traffic_descriptor_components_parseFromJSON(traffic_desc); + if (!traffic_desc_local_nonprim) { + ogs_error("OpenAPI_traffic_descriptor_components_parseFromJSON failed [traffic_desc]"); + goto end; + } } relat_precedence = cJSON_GetObjectItemCaseSensitive(ursp_rule_requestJSON, "relatPrecedence"); @@ -134,7 +138,6 @@ OpenAPI_ursp_rule_request_t *OpenAPI_ursp_rule_request_parseFromJSON(cJSON *ursp OpenAPI_route_selection_parameter_set_t *route_sel_param_setsItem = OpenAPI_route_selection_parameter_set_parseFromJSON(route_sel_param_sets_local); if (!route_sel_param_setsItem) { ogs_error("No route_sel_param_setsItem"); - OpenAPI_list_free(route_sel_param_setsList); goto end; } OpenAPI_list_add(route_sel_param_setsList, route_sel_param_setsItem); diff --git a/lib/sbi/openapi/model/usage_mon_data.c b/lib/sbi/openapi/model/usage_mon_data.c index 018365755..e29dec1c2 100644 --- a/lib/sbi/openapi/model/usage_mon_data.c +++ b/lib/sbi/openapi/model/usage_mon_data.c @@ -229,11 +229,19 @@ OpenAPI_usage_mon_data_t *OpenAPI_usage_mon_data_parseFromJSON(cJSON *usage_mon_ um_level = cJSON_GetObjectItemCaseSensitive(usage_mon_dataJSON, "umLevel"); if (um_level) { um_level_local_nonprim = OpenAPI_usage_mon_level_parseFromJSON(um_level); + if (!um_level_local_nonprim) { + ogs_error("OpenAPI_usage_mon_level_parseFromJSON failed [um_level]"); + goto end; + } } allowed_usage = cJSON_GetObjectItemCaseSensitive(usage_mon_dataJSON, "allowedUsage"); if (allowed_usage) { allowed_usage_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(allowed_usage); + if (!allowed_usage_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_parseFromJSON failed [allowed_usage]"); + goto end; + } } reset_time = cJSON_GetObjectItemCaseSensitive(usage_mon_dataJSON, "resetTime"); diff --git a/lib/sbi/openapi/model/usage_mon_data_limit.c b/lib/sbi/openapi/model/usage_mon_data_limit.c index 7a75ceab8..609feb206 100644 --- a/lib/sbi/openapi/model/usage_mon_data_limit.c +++ b/lib/sbi/openapi/model/usage_mon_data_limit.c @@ -225,6 +225,10 @@ OpenAPI_usage_mon_data_limit_t *OpenAPI_usage_mon_data_limit_parseFromJSON(cJSON um_level = cJSON_GetObjectItemCaseSensitive(usage_mon_data_limitJSON, "umLevel"); if (um_level) { um_level_local_nonprim = OpenAPI_usage_mon_level_parseFromJSON(um_level); + if (!um_level_local_nonprim) { + ogs_error("OpenAPI_usage_mon_level_parseFromJSON failed [um_level]"); + goto end; + } } start_date = cJSON_GetObjectItemCaseSensitive(usage_mon_data_limitJSON, "startDate"); @@ -246,11 +250,19 @@ OpenAPI_usage_mon_data_limit_t *OpenAPI_usage_mon_data_limit_parseFromJSON(cJSON usage_limit = cJSON_GetObjectItemCaseSensitive(usage_mon_data_limitJSON, "usageLimit"); if (usage_limit) { usage_limit_local_nonprim = OpenAPI_usage_threshold_parseFromJSON(usage_limit); + if (!usage_limit_local_nonprim) { + ogs_error("OpenAPI_usage_threshold_parseFromJSON failed [usage_limit]"); + goto end; + } } reset_period = cJSON_GetObjectItemCaseSensitive(usage_mon_data_limitJSON, "resetPeriod"); if (reset_period) { reset_period_local_nonprim = OpenAPI_time_period_parseFromJSON(reset_period); + if (!reset_period_local_nonprim) { + ogs_error("OpenAPI_time_period_parseFromJSON failed [reset_period]"); + goto end; + } } usage_mon_data_limit_local_var = OpenAPI_usage_mon_data_limit_create ( diff --git a/lib/sbi/openapi/model/usage_mon_data_scope.c b/lib/sbi/openapi/model/usage_mon_data_scope.c index d95238fa4..0ece23777 100644 --- a/lib/sbi/openapi/model/usage_mon_data_scope.c +++ b/lib/sbi/openapi/model/usage_mon_data_scope.c @@ -97,6 +97,10 @@ OpenAPI_usage_mon_data_scope_t *OpenAPI_usage_mon_data_scope_parseFromJSON(cJSON goto end; } snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } dnn = cJSON_GetObjectItemCaseSensitive(usage_mon_data_scopeJSON, "dnn"); if (dnn) { diff --git a/lib/sbi/openapi/model/user_data_congestion_info.c b/lib/sbi/openapi/model/user_data_congestion_info.c index 6a46e28f7..663b2d94d 100644 --- a/lib/sbi/openapi/model/user_data_congestion_info.c +++ b/lib/sbi/openapi/model/user_data_congestion_info.c @@ -116,6 +116,10 @@ OpenAPI_user_data_congestion_info_t *OpenAPI_user_data_congestion_info_parseFrom goto end; } network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } congestion_info = cJSON_GetObjectItemCaseSensitive(user_data_congestion_infoJSON, "congestionInfo"); if (!congestion_info) { @@ -123,10 +127,18 @@ OpenAPI_user_data_congestion_info_t *OpenAPI_user_data_congestion_info_parseFrom goto end; } congestion_info_local_nonprim = OpenAPI_congestion_info_parseFromJSON(congestion_info); + if (!congestion_info_local_nonprim) { + ogs_error("OpenAPI_congestion_info_parseFromJSON failed [congestion_info]"); + goto end; + } snssai = cJSON_GetObjectItemCaseSensitive(user_data_congestion_infoJSON, "snssai"); if (snssai) { snssai_local_nonprim = OpenAPI_snssai_parseFromJSON(snssai); + if (!snssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [snssai]"); + goto end; + } } user_data_congestion_info_local_var = OpenAPI_user_data_congestion_info_create ( diff --git a/lib/sbi/openapi/model/user_location.c b/lib/sbi/openapi/model/user_location.c index 13fe41ecd..3507b47e2 100644 --- a/lib/sbi/openapi/model/user_location.c +++ b/lib/sbi/openapi/model/user_location.c @@ -151,26 +151,46 @@ OpenAPI_user_location_t *OpenAPI_user_location_parseFromJSON(cJSON *user_locatio eutra_location = cJSON_GetObjectItemCaseSensitive(user_locationJSON, "eutraLocation"); if (eutra_location) { eutra_location_local_nonprim = OpenAPI_eutra_location_parseFromJSON(eutra_location); + if (!eutra_location_local_nonprim) { + ogs_error("OpenAPI_eutra_location_parseFromJSON failed [eutra_location]"); + goto end; + } } nr_location = cJSON_GetObjectItemCaseSensitive(user_locationJSON, "nrLocation"); if (nr_location) { nr_location_local_nonprim = OpenAPI_nr_location_parseFromJSON(nr_location); + if (!nr_location_local_nonprim) { + ogs_error("OpenAPI_nr_location_parseFromJSON failed [nr_location]"); + goto end; + } } n3ga_location = cJSON_GetObjectItemCaseSensitive(user_locationJSON, "n3gaLocation"); if (n3ga_location) { n3ga_location_local_nonprim = OpenAPI_n3ga_location_parseFromJSON(n3ga_location); + if (!n3ga_location_local_nonprim) { + ogs_error("OpenAPI_n3ga_location_parseFromJSON failed [n3ga_location]"); + goto end; + } } utra_location = cJSON_GetObjectItemCaseSensitive(user_locationJSON, "utraLocation"); if (utra_location) { utra_location_local_nonprim = OpenAPI_utra_location_parseFromJSON(utra_location); + if (!utra_location_local_nonprim) { + ogs_error("OpenAPI_utra_location_parseFromJSON failed [utra_location]"); + goto end; + } } gera_location = cJSON_GetObjectItemCaseSensitive(user_locationJSON, "geraLocation"); if (gera_location) { gera_location_local_nonprim = OpenAPI_gera_location_parseFromJSON(gera_location); + if (!gera_location_local_nonprim) { + ogs_error("OpenAPI_gera_location_parseFromJSON failed [gera_location]"); + goto end; + } } user_location_local_var = OpenAPI_user_location_create ( diff --git a/lib/sbi/openapi/model/utra_location.c b/lib/sbi/openapi/model/utra_location.c index e71b164a1..598cc5ad8 100644 --- a/lib/sbi/openapi/model/utra_location.c +++ b/lib/sbi/openapi/model/utra_location.c @@ -184,21 +184,37 @@ OpenAPI_utra_location_t *OpenAPI_utra_location_parseFromJSON(cJSON *utra_locatio cgi = cJSON_GetObjectItemCaseSensitive(utra_locationJSON, "cgi"); if (cgi) { cgi_local_nonprim = OpenAPI_cell_global_id_parseFromJSON(cgi); + if (!cgi_local_nonprim) { + ogs_error("OpenAPI_cell_global_id_parseFromJSON failed [cgi]"); + goto end; + } } sai = cJSON_GetObjectItemCaseSensitive(utra_locationJSON, "sai"); if (sai) { sai_local_nonprim = OpenAPI_service_area_id_parseFromJSON(sai); + if (!sai_local_nonprim) { + ogs_error("OpenAPI_service_area_id_parseFromJSON failed [sai]"); + goto end; + } } lai = cJSON_GetObjectItemCaseSensitive(utra_locationJSON, "lai"); if (lai) { lai_local_nonprim = OpenAPI_location_area_id_parseFromJSON(lai); + if (!lai_local_nonprim) { + ogs_error("OpenAPI_location_area_id_parseFromJSON failed [lai]"); + goto end; + } } rai = cJSON_GetObjectItemCaseSensitive(utra_locationJSON, "rai"); if (rai) { rai_local_nonprim = OpenAPI_routing_area_id_parseFromJSON(rai); + if (!rai_local_nonprim) { + ogs_error("OpenAPI_routing_area_id_parseFromJSON failed [rai]"); + goto end; + } } age_of_location_information = cJSON_GetObjectItemCaseSensitive(utra_locationJSON, "ageOfLocationInformation"); diff --git a/lib/sbi/openapi/model/v2x_context.c b/lib/sbi/openapi/model/v2x_context.c index b5b01b9c6..bd3f0a668 100644 --- a/lib/sbi/openapi/model/v2x_context.c +++ b/lib/sbi/openapi/model/v2x_context.c @@ -137,11 +137,19 @@ OpenAPI_v2x_context_t *OpenAPI_v2x_context_parseFromJSON(cJSON *v2x_contextJSON) nr_v2x_services_auth = cJSON_GetObjectItemCaseSensitive(v2x_contextJSON, "nrV2xServicesAuth"); if (nr_v2x_services_auth) { nr_v2x_services_auth_local_nonprim = OpenAPI_nr_v2x_auth_parseFromJSON(nr_v2x_services_auth); + if (!nr_v2x_services_auth_local_nonprim) { + ogs_error("OpenAPI_nr_v2x_auth_parseFromJSON failed [nr_v2x_services_auth]"); + goto end; + } } lte_v2x_services_auth = cJSON_GetObjectItemCaseSensitive(v2x_contextJSON, "lteV2xServicesAuth"); if (lte_v2x_services_auth) { lte_v2x_services_auth_local_nonprim = OpenAPI_lte_v2x_auth_parseFromJSON(lte_v2x_services_auth); + if (!lte_v2x_services_auth_local_nonprim) { + ogs_error("OpenAPI_lte_v2x_auth_parseFromJSON failed [lte_v2x_services_auth]"); + goto end; + } } nr_ue_sidelink_ambr = cJSON_GetObjectItemCaseSensitive(v2x_contextJSON, "nrUeSidelinkAmbr"); @@ -163,6 +171,10 @@ OpenAPI_v2x_context_t *OpenAPI_v2x_context_parseFromJSON(cJSON *v2x_contextJSON) pc5_qo_s_para = cJSON_GetObjectItemCaseSensitive(v2x_contextJSON, "pc5QoSPara"); if (pc5_qo_s_para) { pc5_qo_s_para_local_nonprim = OpenAPI_pc5_qo_s_para_parseFromJSON(pc5_qo_s_para); + if (!pc5_qo_s_para_local_nonprim) { + ogs_error("OpenAPI_pc5_qo_s_para_parseFromJSON failed [pc5_qo_s_para]"); + goto end; + } } v2x_context_local_var = OpenAPI_v2x_context_create ( diff --git a/lib/sbi/openapi/model/v2x_information.c b/lib/sbi/openapi/model/v2x_information.c index d6ad0aaf0..e4a11f94d 100644 --- a/lib/sbi/openapi/model/v2x_information.c +++ b/lib/sbi/openapi/model/v2x_information.c @@ -67,6 +67,10 @@ OpenAPI_v2x_information_t *OpenAPI_v2x_information_parseFromJSON(cJSON *v2x_info n2_pc5_pol = cJSON_GetObjectItemCaseSensitive(v2x_informationJSON, "n2Pc5Pol"); if (n2_pc5_pol) { n2_pc5_pol_local_nonprim = OpenAPI_n2_info_content_parseFromJSON(n2_pc5_pol); + if (!n2_pc5_pol_local_nonprim) { + ogs_error("OpenAPI_n2_info_content_parseFromJSON failed [n2_pc5_pol]"); + goto end; + } } v2x_information_local_var = OpenAPI_v2x_information_create ( diff --git a/lib/sbi/openapi/model/v2x_subscription_data.c b/lib/sbi/openapi/model/v2x_subscription_data.c index 6f5e96c79..6dceb85fd 100644 --- a/lib/sbi/openapi/model/v2x_subscription_data.c +++ b/lib/sbi/openapi/model/v2x_subscription_data.c @@ -116,11 +116,19 @@ OpenAPI_v2x_subscription_data_t *OpenAPI_v2x_subscription_data_parseFromJSON(cJS nr_v2x_services_auth = cJSON_GetObjectItemCaseSensitive(v2x_subscription_dataJSON, "nrV2xServicesAuth"); if (nr_v2x_services_auth) { nr_v2x_services_auth_local_nonprim = OpenAPI_nr_v2x_auth_parseFromJSON(nr_v2x_services_auth); + if (!nr_v2x_services_auth_local_nonprim) { + ogs_error("OpenAPI_nr_v2x_auth_parseFromJSON failed [nr_v2x_services_auth]"); + goto end; + } } lte_v2x_services_auth = cJSON_GetObjectItemCaseSensitive(v2x_subscription_dataJSON, "lteV2xServicesAuth"); if (lte_v2x_services_auth) { lte_v2x_services_auth_local_nonprim = OpenAPI_lte_v2x_auth_parseFromJSON(lte_v2x_services_auth); + if (!lte_v2x_services_auth_local_nonprim) { + ogs_error("OpenAPI_lte_v2x_auth_parseFromJSON failed [lte_v2x_services_auth]"); + goto end; + } } nr_ue_pc5_ambr = cJSON_GetObjectItemCaseSensitive(v2x_subscription_dataJSON, "nrUePc5Ambr"); diff --git a/lib/sbi/openapi/model/vn_group_data.c b/lib/sbi/openapi/model/vn_group_data.c index cce2a9597..e3fc47a98 100644 --- a/lib/sbi/openapi/model/vn_group_data.c +++ b/lib/sbi/openapi/model/vn_group_data.c @@ -129,6 +129,10 @@ OpenAPI_vn_group_data_t *OpenAPI_vn_group_data_parseFromJSON(cJSON *vn_group_dat pdu_session_types = cJSON_GetObjectItemCaseSensitive(vn_group_dataJSON, "pduSessionTypes"); if (pdu_session_types) { pdu_session_types_local_nonprim = OpenAPI_pdu_session_types_parseFromJSON(pdu_session_types); + if (!pdu_session_types_local_nonprim) { + ogs_error("OpenAPI_pdu_session_types_parseFromJSON failed [pdu_session_types]"); + goto end; + } } dnn = cJSON_GetObjectItemCaseSensitive(vn_group_dataJSON, "dnn"); @@ -142,6 +146,10 @@ OpenAPI_vn_group_data_t *OpenAPI_vn_group_data_parseFromJSON(cJSON *vn_group_dat single_nssai = cJSON_GetObjectItemCaseSensitive(vn_group_dataJSON, "singleNssai"); if (single_nssai) { single_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(single_nssai); + if (!single_nssai_local_nonprim) { + ogs_error("OpenAPI_snssai_parseFromJSON failed [single_nssai]"); + goto end; + } } app_descriptors = cJSON_GetObjectItemCaseSensitive(vn_group_dataJSON, "appDescriptors"); @@ -162,7 +170,6 @@ OpenAPI_vn_group_data_t *OpenAPI_vn_group_data_parseFromJSON(cJSON *vn_group_dat OpenAPI_app_descriptor_t *app_descriptorsItem = OpenAPI_app_descriptor_parseFromJSON(app_descriptors_local); if (!app_descriptorsItem) { ogs_error("No app_descriptorsItem"); - OpenAPI_list_free(app_descriptorsList); goto end; } OpenAPI_list_add(app_descriptorsList, app_descriptorsItem); diff --git a/lib/sbi/openapi/model/vplmn_qos.c b/lib/sbi/openapi/model/vplmn_qos.c index 023c0d435..011c0826e 100644 --- a/lib/sbi/openapi/model/vplmn_qos.c +++ b/lib/sbi/openapi/model/vplmn_qos.c @@ -164,11 +164,19 @@ OpenAPI_vplmn_qos_t *OpenAPI_vplmn_qos_parseFromJSON(cJSON *vplmn_qosJSON) arp = cJSON_GetObjectItemCaseSensitive(vplmn_qosJSON, "arp"); if (arp) { arp_local_nonprim = OpenAPI_arp_parseFromJSON(arp); + if (!arp_local_nonprim) { + ogs_error("OpenAPI_arp_parseFromJSON failed [arp]"); + goto end; + } } session_ambr = cJSON_GetObjectItemCaseSensitive(vplmn_qosJSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } } max_fbr_dl = cJSON_GetObjectItemCaseSensitive(vplmn_qosJSON, "maxFbrDl"); diff --git a/lib/sbi/openapi/model/vsmf_update_data.c b/lib/sbi/openapi/model/vsmf_update_data.c index 1fcb7144d..161fc76f3 100644 --- a/lib/sbi/openapi/model/vsmf_update_data.c +++ b/lib/sbi/openapi/model/vsmf_update_data.c @@ -620,6 +620,10 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u session_ambr = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "sessionAmbr"); if (session_ambr) { session_ambr_local_nonprim = OpenAPI_ambr_parseFromJSON(session_ambr); + if (!session_ambr_local_nonprim) { + ogs_error("OpenAPI_ambr_parseFromJSON failed [session_ambr]"); + goto end; + } } qos_flows_add_mod_request_list = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "qosFlowsAddModRequestList"); @@ -640,7 +644,6 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u OpenAPI_qos_flow_add_modify_request_item_t *qos_flows_add_mod_request_listItem = OpenAPI_qos_flow_add_modify_request_item_parseFromJSON(qos_flows_add_mod_request_list_local); if (!qos_flows_add_mod_request_listItem) { ogs_error("No qos_flows_add_mod_request_listItem"); - OpenAPI_list_free(qos_flows_add_mod_request_listList); goto end; } OpenAPI_list_add(qos_flows_add_mod_request_listList, qos_flows_add_mod_request_listItem); @@ -665,7 +668,6 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u OpenAPI_qos_flow_release_request_item_t *qos_flows_rel_request_listItem = OpenAPI_qos_flow_release_request_item_parseFromJSON(qos_flows_rel_request_list_local); if (!qos_flows_rel_request_listItem) { ogs_error("No qos_flows_rel_request_listItem"); - OpenAPI_list_free(qos_flows_rel_request_listList); goto end; } OpenAPI_list_add(qos_flows_rel_request_listList, qos_flows_rel_request_listItem); @@ -690,7 +692,6 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u OpenAPI_eps_bearer_info_t *eps_bearer_infoItem = OpenAPI_eps_bearer_info_parseFromJSON(eps_bearer_info_local); if (!eps_bearer_infoItem) { ogs_error("No eps_bearer_infoItem"); - OpenAPI_list_free(eps_bearer_infoList); goto end; } OpenAPI_list_add(eps_bearer_infoList, eps_bearer_infoItem); @@ -715,7 +716,6 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u OpenAPI_arp_t *assign_ebi_listItem = OpenAPI_arp_parseFromJSON(assign_ebi_list_local); if (!assign_ebi_listItem) { ogs_error("No assign_ebi_listItem"); - OpenAPI_list_free(assign_ebi_listList); goto end; } OpenAPI_list_add(assign_ebi_listList, assign_ebi_listItem); @@ -767,7 +767,6 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u OpenAPI_ebi_arp_mapping_t *modified_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(modified_ebi_list_local); if (!modified_ebi_listItem) { ogs_error("No modified_ebi_listItem"); - OpenAPI_list_free(modified_ebi_listList); goto end; } OpenAPI_list_add(modified_ebi_listList, modified_ebi_listItem); @@ -785,6 +784,10 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u n1_sm_info_to_ue = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n1SmInfoToUe"); if (n1_sm_info_to_ue) { n1_sm_info_to_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_to_ue); + if (!n1_sm_info_to_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_to_ue]"); + goto end; + } } always_on_granted = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "alwaysOnGranted"); @@ -872,6 +875,10 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u additional_cn_tunnel_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "additionalCnTunnelInfo"); if (additional_cn_tunnel_info) { additional_cn_tunnel_info_local_nonprim = OpenAPI_tunnel_info_parseFromJSON(additional_cn_tunnel_info); + if (!additional_cn_tunnel_info_local_nonprim) { + ogs_error("OpenAPI_tunnel_info_parseFromJSON failed [additional_cn_tunnel_info]"); + goto end; + } } dnai_list = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "dnaiList"); @@ -898,21 +905,37 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u n4_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } n4_info_ext3 = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n4InfoExt3"); if (n4_info_ext3) { n4_info_ext3_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext3); + if (!n4_info_ext3_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext3]"); + goto end; + } } small_data_rate_control_enabled = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "smallDataRateControlEnabled"); @@ -926,11 +949,19 @@ OpenAPI_vsmf_update_data_t *OpenAPI_vsmf_update_data_parseFromJSON(cJSON *vsmf_u qos_monitoring_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "qosMonitoringInfo"); if (qos_monitoring_info) { qos_monitoring_info_local_nonprim = OpenAPI_qos_monitoring_info_parseFromJSON(qos_monitoring_info); + if (!qos_monitoring_info_local_nonprim) { + ogs_error("OpenAPI_qos_monitoring_info_parseFromJSON failed [qos_monitoring_info]"); + goto end; + } } eps_pdn_cnx_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "epsPdnCnxInfo"); if (eps_pdn_cnx_info) { eps_pdn_cnx_info_local_nonprim = OpenAPI_eps_pdn_cnx_info_parseFromJSON(eps_pdn_cnx_info); + if (!eps_pdn_cnx_info_local_nonprim) { + ogs_error("OpenAPI_eps_pdn_cnx_info_parseFromJSON failed [eps_pdn_cnx_info]"); + goto end; + } } n9_data_forwarding_ind = cJSON_GetObjectItemCaseSensitive(vsmf_update_dataJSON, "n9DataForwardingInd"); diff --git a/lib/sbi/openapi/model/vsmf_update_error.c b/lib/sbi/openapi/model/vsmf_update_error.c index d1a1411a8..31b62d448 100644 --- a/lib/sbi/openapi/model/vsmf_update_error.c +++ b/lib/sbi/openapi/model/vsmf_update_error.c @@ -298,6 +298,10 @@ OpenAPI_vsmf_update_error_t *OpenAPI_vsmf_update_error_parseFromJSON(cJSON *vsmf goto end; } error_local_nonprim = OpenAPI_ext_problem_details_parseFromJSON(error); + if (!error_local_nonprim) { + ogs_error("OpenAPI_ext_problem_details_parseFromJSON failed [error]"); + goto end; + } pti = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "pti"); if (pti) { @@ -318,11 +322,19 @@ OpenAPI_vsmf_update_error_t *OpenAPI_vsmf_update_error_parseFromJSON(cJSON *vsmf n1_sm_info_from_ue = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "n1SmInfoFromUe"); if (n1_sm_info_from_ue) { n1_sm_info_from_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_from_ue); + if (!n1_sm_info_from_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_from_ue]"); + goto end; + } } unknown_n1_sm_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "unknownN1SmInfo"); if (unknown_n1_sm_info) { unknown_n1_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(unknown_n1_sm_info); + if (!unknown_n1_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [unknown_n1_sm_info]"); + goto end; + } } failed_to_assign_ebi_list = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "failedToAssignEbiList"); @@ -343,7 +355,6 @@ OpenAPI_vsmf_update_error_t *OpenAPI_vsmf_update_error_parseFromJSON(cJSON *vsmf OpenAPI_arp_t *failed_to_assign_ebi_listItem = OpenAPI_arp_parseFromJSON(failed_to_assign_ebi_list_local); if (!failed_to_assign_ebi_listItem) { ogs_error("No failed_to_assign_ebi_listItem"); - OpenAPI_list_free(failed_to_assign_ebi_listList); goto end; } OpenAPI_list_add(failed_to_assign_ebi_listList, failed_to_assign_ebi_listItem); @@ -353,6 +364,10 @@ OpenAPI_vsmf_update_error_t *OpenAPI_vsmf_update_error_parseFromJSON(cJSON *vsmf ng_ap_cause = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "ngApCause"); if (ng_ap_cause) { ng_ap_cause_local_nonprim = OpenAPI_ng_ap_cause_parseFromJSON(ng_ap_cause); + if (!ng_ap_cause_local_nonprim) { + ogs_error("OpenAPI_ng_ap_cause_parseFromJSON failed [ng_ap_cause]"); + goto end; + } } _5g_mm_cause_value = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "5gMmCauseValue"); @@ -374,21 +389,37 @@ OpenAPI_vsmf_update_error_t *OpenAPI_vsmf_update_error_parseFromJSON(cJSON *vsmf n4_info = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } n4_info_ext3 = cJSON_GetObjectItemCaseSensitive(vsmf_update_errorJSON, "n4InfoExt3"); if (n4_info_ext3) { n4_info_ext3_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext3); + if (!n4_info_ext3_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext3]"); + goto end; + } } vsmf_update_error_local_var = OpenAPI_vsmf_update_error_create ( diff --git a/lib/sbi/openapi/model/vsmf_updated_data.c b/lib/sbi/openapi/model/vsmf_updated_data.c index 6d3baebac..df53d042b 100644 --- a/lib/sbi/openapi/model/vsmf_updated_data.c +++ b/lib/sbi/openapi/model/vsmf_updated_data.c @@ -484,7 +484,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_qos_flow_item_t *qos_flows_add_mod_listItem = OpenAPI_qos_flow_item_parseFromJSON(qos_flows_add_mod_list_local); if (!qos_flows_add_mod_listItem) { ogs_error("No qos_flows_add_mod_listItem"); - OpenAPI_list_free(qos_flows_add_mod_listList); goto end; } OpenAPI_list_add(qos_flows_add_mod_listList, qos_flows_add_mod_listItem); @@ -509,7 +508,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_qos_flow_item_t *qos_flows_rel_listItem = OpenAPI_qos_flow_item_parseFromJSON(qos_flows_rel_list_local); if (!qos_flows_rel_listItem) { ogs_error("No qos_flows_rel_listItem"); - OpenAPI_list_free(qos_flows_rel_listList); goto end; } OpenAPI_list_add(qos_flows_rel_listList, qos_flows_rel_listItem); @@ -534,7 +532,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_qos_flow_item_t *qos_flows_failedto_add_mod_listItem = OpenAPI_qos_flow_item_parseFromJSON(qos_flows_failedto_add_mod_list_local); if (!qos_flows_failedto_add_mod_listItem) { ogs_error("No qos_flows_failedto_add_mod_listItem"); - OpenAPI_list_free(qos_flows_failedto_add_mod_listList); goto end; } OpenAPI_list_add(qos_flows_failedto_add_mod_listList, qos_flows_failedto_add_mod_listItem); @@ -559,7 +556,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_qos_flow_item_t *qos_flows_failedto_rel_listItem = OpenAPI_qos_flow_item_parseFromJSON(qos_flows_failedto_rel_list_local); if (!qos_flows_failedto_rel_listItem) { ogs_error("No qos_flows_failedto_rel_listItem"); - OpenAPI_list_free(qos_flows_failedto_rel_listList); goto end; } OpenAPI_list_add(qos_flows_failedto_rel_listList, qos_flows_failedto_rel_listItem); @@ -569,16 +565,28 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf n1_sm_info_from_ue = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "n1SmInfoFromUe"); if (n1_sm_info_from_ue) { n1_sm_info_from_ue_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(n1_sm_info_from_ue); + if (!n1_sm_info_from_ue_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [n1_sm_info_from_ue]"); + goto end; + } } unknown_n1_sm_info = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "unknownN1SmInfo"); if (unknown_n1_sm_info) { unknown_n1_sm_info_local_nonprim = OpenAPI_ref_to_binary_data_parseFromJSON(unknown_n1_sm_info); + if (!unknown_n1_sm_info_local_nonprim) { + ogs_error("OpenAPI_ref_to_binary_data_parseFromJSON failed [unknown_n1_sm_info]"); + goto end; + } } ue_location = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "ueLocation"); if (ue_location) { ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(ue_location); + if (!ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [ue_location]"); + goto end; + } } ue_time_zone = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "ueTimeZone"); @@ -592,6 +600,10 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf add_ue_location = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "addUeLocation"); if (add_ue_location) { add_ue_location_local_nonprim = OpenAPI_user_location_parseFromJSON(add_ue_location); + if (!add_ue_location_local_nonprim) { + ogs_error("OpenAPI_user_location_parseFromJSON failed [add_ue_location]"); + goto end; + } } assigned_ebi_list = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "assignedEbiList"); @@ -612,7 +624,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_ebi_arp_mapping_t *assigned_ebi_listItem = OpenAPI_ebi_arp_mapping_parseFromJSON(assigned_ebi_list_local); if (!assigned_ebi_listItem) { ogs_error("No assigned_ebi_listItem"); - OpenAPI_list_free(assigned_ebi_listList); goto end; } OpenAPI_list_add(assigned_ebi_listList, assigned_ebi_listItem); @@ -637,7 +648,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_arp_t *failed_to_assign_ebi_listItem = OpenAPI_arp_parseFromJSON(failed_to_assign_ebi_list_local); if (!failed_to_assign_ebi_listItem) { ogs_error("No failed_to_assign_ebi_listItem"); - OpenAPI_list_free(failed_to_assign_ebi_listList); goto end; } OpenAPI_list_add(failed_to_assign_ebi_listList, failed_to_assign_ebi_listItem); @@ -689,7 +699,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_secondary_rat_usage_report_t *secondary_rat_usage_reportItem = OpenAPI_secondary_rat_usage_report_parseFromJSON(secondary_rat_usage_report_local); if (!secondary_rat_usage_reportItem) { ogs_error("No secondary_rat_usage_reportItem"); - OpenAPI_list_free(secondary_rat_usage_reportList); goto end; } OpenAPI_list_add(secondary_rat_usage_reportList, secondary_rat_usage_reportItem); @@ -714,7 +723,6 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf OpenAPI_secondary_rat_usage_info_t *secondary_rat_usage_infoItem = OpenAPI_secondary_rat_usage_info_parseFromJSON(secondary_rat_usage_info_local); if (!secondary_rat_usage_infoItem) { ogs_error("No secondary_rat_usage_infoItem"); - OpenAPI_list_free(secondary_rat_usage_infoList); goto end; } OpenAPI_list_add(secondary_rat_usage_infoList, secondary_rat_usage_infoItem); @@ -724,21 +732,37 @@ OpenAPI_vsmf_updated_data_t *OpenAPI_vsmf_updated_data_parseFromJSON(cJSON *vsmf n4_info = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "n4Info"); if (n4_info) { n4_info_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info); + if (!n4_info_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info]"); + goto end; + } } n4_info_ext1 = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "n4InfoExt1"); if (n4_info_ext1) { n4_info_ext1_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext1); + if (!n4_info_ext1_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext1]"); + goto end; + } } n4_info_ext2 = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "n4InfoExt2"); if (n4_info_ext2) { n4_info_ext2_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext2); + if (!n4_info_ext2_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext2]"); + goto end; + } } n4_info_ext3 = cJSON_GetObjectItemCaseSensitive(vsmf_updated_dataJSON, "n4InfoExt3"); if (n4_info_ext3) { n4_info_ext3_local_nonprim = OpenAPI_n4_information_parseFromJSON(n4_info_ext3); + if (!n4_info_ext3_local_nonprim) { + ogs_error("OpenAPI_n4_information_parseFromJSON failed [n4_info_ext3]"); + goto end; + } } vsmf_updated_data_local_var = OpenAPI_vsmf_updated_data_create ( diff --git a/lib/sbi/openapi/model/wireline_service_area_restriction.c b/lib/sbi/openapi/model/wireline_service_area_restriction.c index 6350617c1..08c853d5f 100644 --- a/lib/sbi/openapi/model/wireline_service_area_restriction.c +++ b/lib/sbi/openapi/model/wireline_service_area_restriction.c @@ -108,7 +108,6 @@ OpenAPI_wireline_service_area_restriction_t *OpenAPI_wireline_service_area_restr OpenAPI_wireline_area_t *areasItem = OpenAPI_wireline_area_parseFromJSON(areas_local); if (!areasItem) { ogs_error("No areasItem"); - OpenAPI_list_free(areasList); goto end; } OpenAPI_list_add(areasList, areasItem); diff --git a/lib/sbi/openapi/model/wireline_service_area_restriction_1.c b/lib/sbi/openapi/model/wireline_service_area_restriction_1.c index 2c608ae8d..bbfb879fd 100644 --- a/lib/sbi/openapi/model/wireline_service_area_restriction_1.c +++ b/lib/sbi/openapi/model/wireline_service_area_restriction_1.c @@ -108,7 +108,6 @@ OpenAPI_wireline_service_area_restriction_1_t *OpenAPI_wireline_service_area_res OpenAPI_wireline_area_1_t *areasItem = OpenAPI_wireline_area_1_parseFromJSON(areas_local); if (!areasItem) { ogs_error("No areasItem"); - OpenAPI_list_free(areasList); goto end; } OpenAPI_list_add(areasList, areasItem); diff --git a/lib/sbi/openapi/model/wlan_per_ss_id_performance_info.c b/lib/sbi/openapi/model/wlan_per_ss_id_performance_info.c index d6355b7d2..e5a913395 100644 --- a/lib/sbi/openapi/model/wlan_per_ss_id_performance_info.c +++ b/lib/sbi/openapi/model/wlan_per_ss_id_performance_info.c @@ -119,7 +119,6 @@ OpenAPI_wlan_per_ss_id_performance_info_t *OpenAPI_wlan_per_ss_id_performance_in OpenAPI_wlan_per_ts_performance_info_t *wlan_per_ts_infosItem = OpenAPI_wlan_per_ts_performance_info_parseFromJSON(wlan_per_ts_infos_local); if (!wlan_per_ts_infosItem) { ogs_error("No wlan_per_ts_infosItem"); - OpenAPI_list_free(wlan_per_ts_infosList); goto end; } OpenAPI_list_add(wlan_per_ts_infosList, wlan_per_ts_infosItem); diff --git a/lib/sbi/openapi/model/wlan_per_ts_performance_info.c b/lib/sbi/openapi/model/wlan_per_ts_performance_info.c index a7993ba91..fa8badc2e 100644 --- a/lib/sbi/openapi/model/wlan_per_ts_performance_info.c +++ b/lib/sbi/openapi/model/wlan_per_ts_performance_info.c @@ -175,6 +175,10 @@ OpenAPI_wlan_per_ts_performance_info_t *OpenAPI_wlan_per_ts_performance_info_par traffic_info = cJSON_GetObjectItemCaseSensitive(wlan_per_ts_performance_infoJSON, "trafficInfo"); if (traffic_info) { traffic_info_local_nonprim = OpenAPI_traffic_information_parseFromJSON(traffic_info); + if (!traffic_info_local_nonprim) { + ogs_error("OpenAPI_traffic_information_parseFromJSON failed [traffic_info]"); + goto end; + } } number_of_ues = cJSON_GetObjectItemCaseSensitive(wlan_per_ts_performance_infoJSON, "numberOfUes"); diff --git a/lib/sbi/openapi/model/wlan_performance_info.c b/lib/sbi/openapi/model/wlan_performance_info.c index 7c9aa1461..346a6bfb4 100644 --- a/lib/sbi/openapi/model/wlan_performance_info.c +++ b/lib/sbi/openapi/model/wlan_performance_info.c @@ -96,6 +96,10 @@ OpenAPI_wlan_performance_info_t *OpenAPI_wlan_performance_info_parseFromJSON(cJS network_area = cJSON_GetObjectItemCaseSensitive(wlan_performance_infoJSON, "networkArea"); if (network_area) { network_area_local_nonprim = OpenAPI_network_area_info_parseFromJSON(network_area); + if (!network_area_local_nonprim) { + ogs_error("OpenAPI_network_area_info_parseFromJSON failed [network_area]"); + goto end; + } } wlan_per_ssid_infos = cJSON_GetObjectItemCaseSensitive(wlan_performance_infoJSON, "wlanPerSsidInfos"); @@ -119,7 +123,6 @@ OpenAPI_wlan_performance_info_t *OpenAPI_wlan_performance_info_parseFromJSON(cJS OpenAPI_wlan_per_ss_id_performance_info_t *wlan_per_ssid_infosItem = OpenAPI_wlan_per_ss_id_performance_info_parseFromJSON(wlan_per_ssid_infos_local); if (!wlan_per_ssid_infosItem) { ogs_error("No wlan_per_ssid_infosItem"); - OpenAPI_list_free(wlan_per_ssid_infosList); goto end; } OpenAPI_list_add(wlan_per_ssid_infosList, wlan_per_ssid_infosItem); diff --git a/lib/sbi/openapi/model/wlan_performance_req.c b/lib/sbi/openapi/model/wlan_performance_req.c index aa406499c..b5a90daf4 100644 --- a/lib/sbi/openapi/model/wlan_performance_req.c +++ b/lib/sbi/openapi/model/wlan_performance_req.c @@ -180,11 +180,19 @@ OpenAPI_wlan_performance_req_t *OpenAPI_wlan_performance_req_parseFromJSON(cJSON wlan_order_criter = cJSON_GetObjectItemCaseSensitive(wlan_performance_reqJSON, "wlanOrderCriter"); if (wlan_order_criter) { wlan_order_criter_local_nonprim = OpenAPI_wlan_ordering_criterion_parseFromJSON(wlan_order_criter); + if (!wlan_order_criter_local_nonprim) { + ogs_error("OpenAPI_wlan_ordering_criterion_parseFromJSON failed [wlan_order_criter]"); + goto end; + } } order = cJSON_GetObjectItemCaseSensitive(wlan_performance_reqJSON, "order"); if (order) { order_local_nonprim = OpenAPI_matching_direction_parseFromJSON(order); + if (!order_local_nonprim) { + ogs_error("OpenAPI_matching_direction_parseFromJSON failed [order]"); + goto end; + } } wlan_performance_req_local_var = OpenAPI_wlan_performance_req_create ( diff --git a/lib/sbi/support/r17-20230301-openapitools-6.4.0/openapi-generator/templates/model-body.mustache b/lib/sbi/support/r17-20230301-openapitools-6.4.0/openapi-generator/templates/model-body.mustache index 4621a94ec..4138cf231 100644 --- a/lib/sbi/support/r17-20230301-openapitools-6.4.0/openapi-generator/templates/model-body.mustache +++ b/lib/sbi/support/r17-20230301-openapitools-6.4.0/openapi-generator/templates/model-body.mustache @@ -706,6 +706,10 @@ OpenAPI_{{classname}}_t *OpenAPI_{{classname}}_parseFromJSON(cJSON *{{classname} {{^isEnum}} {{#isModel}} {{{name}}}_local_nonprim = OpenAPI_{{complexType}}{{#isFreeFormObject}}object{{/isFreeFormObject}}_parseFromJSON({{{name}}}); + if (!{{{name}}}_local_nonprim) { + ogs_error("OpenAPI_{{complexType}}{{#isFreeFormObject}}object{{/isFreeFormObject}}_parseFromJSON failed [{{{name}}}]"); + goto end; + } {{/isModel}} {{^isModel}} {{#isUuid}} @@ -808,7 +812,6 @@ OpenAPI_{{classname}}_t *OpenAPI_{{classname}}_parseFromJSON(cJSON *{{classname} OpenAPI_{{complexType}}_t *{{{name}}}Item = OpenAPI_{{complexType}}_parseFromJSON({{{name}}}_local); if (!{{{name}}}Item) { ogs_error("No {{{name}}}Item"); - OpenAPI_list_free({{{name}}}List); goto end; } OpenAPI_list_add({{{name}}}List, {{{name}}}Item);