Use talloc for all memory pool (#1263)

This commit is contained in:
Sukchan Lee 2022-01-04 08:29:18 +09:00
parent 49d9ed03c7
commit b988e7edce
768 changed files with 4632 additions and 4901 deletions

View file

@ -28,10 +28,9 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_create(
char *selected_old_smf_id
)
{
OpenAPI_sm_context_updated_data_t *sm_context_updated_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_sm_context_updated_data_t));
if (!sm_context_updated_data_local_var) {
return NULL;
}
OpenAPI_sm_context_updated_data_t *sm_context_updated_data_local_var = ogs_malloc(sizeof(OpenAPI_sm_context_updated_data_t));
ogs_assert(sm_context_updated_data_local_var);
sm_context_updated_data_local_var->up_cnx_state = up_cnx_state;
sm_context_updated_data_local_var->ho_state = ho_state;
sm_context_updated_data_local_var->release_ebi_list = release_ebi_list;
@ -469,7 +468,7 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON
ogs_error("OpenAPI_sm_context_updated_data_parseFromJSON() failed [eps_bearer_setup]");
goto end;
}
OpenAPI_list_add(eps_bearer_setupList , ogs_strdup_or_assert(eps_bearer_setup_local->valuestring));
OpenAPI_list_add(eps_bearer_setupList , ogs_strdup(eps_bearer_setup_local->valuestring));
}
}
@ -582,7 +581,7 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON
ogs_error("OpenAPI_sm_context_updated_data_parseFromJSON() failed [forwarding_bearer_contexts]");
goto end;
}
OpenAPI_list_add(forwarding_bearer_contextsList , ogs_strdup_or_assert(forwarding_bearer_contexts_local->valuestring));
OpenAPI_list_add(forwarding_bearer_contextsList , ogs_strdup(forwarding_bearer_contexts_local->valuestring));
}
}
@ -621,11 +620,11 @@ OpenAPI_sm_context_updated_data_t *OpenAPI_sm_context_updated_data_parseFromJSON
cause ? causeVariable : 0,
ma_accepted_ind ? true : false,
ma_accepted_ind ? ma_accepted_ind->valueint : 0,
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
supported_features ? ogs_strdup(supported_features->valuestring) : NULL,
forwarding_f_teid ? forwarding_f_teid->valueint : 0,
forwarding_bearer_contexts ? forwarding_bearer_contextsList : NULL,
selected_smf_id ? ogs_strdup_or_assert(selected_smf_id->valuestring) : NULL,
selected_old_smf_id ? ogs_strdup_or_assert(selected_old_smf_id->valuestring) : NULL
selected_smf_id ? ogs_strdup(selected_smf_id->valuestring) : NULL,
selected_old_smf_id ? ogs_strdup(selected_old_smf_id->valuestring) : NULL
);
return sm_context_updated_data_local_var;