mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 13:20:08 +00:00
[SBI] Crash occurs when ENUM in the MAP (#2103)
This commit is contained in:
parent
ce668c556c
commit
969c116e77
1097 changed files with 266728 additions and 42047 deletions
|
|
@ -26,21 +26,38 @@ OpenAPI_registration_data_sets_t *OpenAPI_registration_data_sets_create(
|
|||
|
||||
void OpenAPI_registration_data_sets_free(OpenAPI_registration_data_sets_t *registration_data_sets)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == registration_data_sets) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_amf3_gpp_access_registration_free(registration_data_sets->amf3_gpp);
|
||||
OpenAPI_amf_non3_gpp_access_registration_free(registration_data_sets->amf_non3_gpp);
|
||||
OpenAPI_smf_registration_info_free(registration_data_sets->smf_registration);
|
||||
OpenAPI_smsf_registration_free(registration_data_sets->smsf3_gpp);
|
||||
OpenAPI_smsf_registration_free(registration_data_sets->smsf_non3_gpp);
|
||||
if (registration_data_sets->amf3_gpp) {
|
||||
OpenAPI_amf3_gpp_access_registration_free(registration_data_sets->amf3_gpp);
|
||||
registration_data_sets->amf3_gpp = NULL;
|
||||
}
|
||||
if (registration_data_sets->amf_non3_gpp) {
|
||||
OpenAPI_amf_non3_gpp_access_registration_free(registration_data_sets->amf_non3_gpp);
|
||||
registration_data_sets->amf_non3_gpp = NULL;
|
||||
}
|
||||
if (registration_data_sets->smf_registration) {
|
||||
OpenAPI_smf_registration_info_free(registration_data_sets->smf_registration);
|
||||
registration_data_sets->smf_registration = NULL;
|
||||
}
|
||||
if (registration_data_sets->smsf3_gpp) {
|
||||
OpenAPI_smsf_registration_free(registration_data_sets->smsf3_gpp);
|
||||
registration_data_sets->smsf3_gpp = NULL;
|
||||
}
|
||||
if (registration_data_sets->smsf_non3_gpp) {
|
||||
OpenAPI_smsf_registration_free(registration_data_sets->smsf_non3_gpp);
|
||||
registration_data_sets->smsf_non3_gpp = NULL;
|
||||
}
|
||||
ogs_free(registration_data_sets);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_registration_data_sets_convertToJSON(OpenAPI_registration_data_sets_t *registration_data_sets)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (registration_data_sets == NULL) {
|
||||
ogs_error("OpenAPI_registration_data_sets_convertToJSON() failed [RegistrationDataSets]");
|
||||
|
|
@ -120,37 +137,38 @@ end:
|
|||
OpenAPI_registration_data_sets_t *OpenAPI_registration_data_sets_parseFromJSON(cJSON *registration_data_setsJSON)
|
||||
{
|
||||
OpenAPI_registration_data_sets_t *registration_data_sets_local_var = NULL;
|
||||
cJSON *amf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "amf3Gpp");
|
||||
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *amf3_gpp = NULL;
|
||||
OpenAPI_amf3_gpp_access_registration_t *amf3_gpp_local_nonprim = NULL;
|
||||
cJSON *amf_non3_gpp = NULL;
|
||||
OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_local_nonprim = NULL;
|
||||
cJSON *smf_registration = NULL;
|
||||
OpenAPI_smf_registration_info_t *smf_registration_local_nonprim = NULL;
|
||||
cJSON *smsf3_gpp = NULL;
|
||||
OpenAPI_smsf_registration_t *smsf3_gpp_local_nonprim = NULL;
|
||||
cJSON *smsf_non3_gpp = NULL;
|
||||
OpenAPI_smsf_registration_t *smsf_non3_gpp_local_nonprim = NULL;
|
||||
amf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "amf3Gpp");
|
||||
if (amf3_gpp) {
|
||||
amf3_gpp_local_nonprim = OpenAPI_amf3_gpp_access_registration_parseFromJSON(amf3_gpp);
|
||||
}
|
||||
|
||||
cJSON *amf_non3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "amfNon3Gpp");
|
||||
|
||||
OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_local_nonprim = NULL;
|
||||
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);
|
||||
}
|
||||
|
||||
cJSON *smf_registration = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smfRegistration");
|
||||
|
||||
OpenAPI_smf_registration_info_t *smf_registration_local_nonprim = NULL;
|
||||
smf_registration = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smfRegistration");
|
||||
if (smf_registration) {
|
||||
smf_registration_local_nonprim = OpenAPI_smf_registration_info_parseFromJSON(smf_registration);
|
||||
}
|
||||
|
||||
cJSON *smsf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smsf3Gpp");
|
||||
|
||||
OpenAPI_smsf_registration_t *smsf3_gpp_local_nonprim = NULL;
|
||||
smsf3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smsf3Gpp");
|
||||
if (smsf3_gpp) {
|
||||
smsf3_gpp_local_nonprim = OpenAPI_smsf_registration_parseFromJSON(smsf3_gpp);
|
||||
}
|
||||
|
||||
cJSON *smsf_non3_gpp = cJSON_GetObjectItemCaseSensitive(registration_data_setsJSON, "smsfNon3Gpp");
|
||||
|
||||
OpenAPI_smsf_registration_t *smsf_non3_gpp_local_nonprim = NULL;
|
||||
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);
|
||||
}
|
||||
|
|
@ -165,6 +183,26 @@ OpenAPI_registration_data_sets_t *OpenAPI_registration_data_sets_parseFromJSON(c
|
|||
|
||||
return registration_data_sets_local_var;
|
||||
end:
|
||||
if (amf3_gpp_local_nonprim) {
|
||||
OpenAPI_amf3_gpp_access_registration_free(amf3_gpp_local_nonprim);
|
||||
amf3_gpp_local_nonprim = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_local_nonprim) {
|
||||
OpenAPI_amf_non3_gpp_access_registration_free(amf_non3_gpp_local_nonprim);
|
||||
amf_non3_gpp_local_nonprim = NULL;
|
||||
}
|
||||
if (smf_registration_local_nonprim) {
|
||||
OpenAPI_smf_registration_info_free(smf_registration_local_nonprim);
|
||||
smf_registration_local_nonprim = NULL;
|
||||
}
|
||||
if (smsf3_gpp_local_nonprim) {
|
||||
OpenAPI_smsf_registration_free(smsf3_gpp_local_nonprim);
|
||||
smsf3_gpp_local_nonprim = NULL;
|
||||
}
|
||||
if (smsf_non3_gpp_local_nonprim) {
|
||||
OpenAPI_smsf_registration_free(smsf_non3_gpp_local_nonprim);
|
||||
smsf_non3_gpp_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue