mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
Use talloc for all memory pool (#1263)
This commit is contained in:
parent
49d9ed03c7
commit
b988e7edce
768 changed files with 4632 additions and 4901 deletions
|
|
@ -27,10 +27,9 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
OpenAPI_guami_t *guami
|
||||
)
|
||||
{
|
||||
OpenAPI_policy_association_update_request_t *policy_association_update_request_local_var = OpenAPI_malloc(sizeof(OpenAPI_policy_association_update_request_t));
|
||||
if (!policy_association_update_request_local_var) {
|
||||
return NULL;
|
||||
}
|
||||
OpenAPI_policy_association_update_request_t *policy_association_update_request_local_var = ogs_malloc(sizeof(OpenAPI_policy_association_update_request_t));
|
||||
ogs_assert(policy_association_update_request_local_var);
|
||||
|
||||
policy_association_update_request_local_var->notification_uri = notification_uri;
|
||||
policy_association_update_request_local_var->alt_notif_ipv4_addrs = alt_notif_ipv4_addrs;
|
||||
policy_association_update_request_local_var->alt_notif_ipv6_addrs = alt_notif_ipv6_addrs;
|
||||
|
|
@ -81,6 +80,7 @@ void OpenAPI_policy_association_update_request_free(OpenAPI_policy_association_u
|
|||
OpenAPI_ambr_free(policy_association_update_request->ue_ambr);
|
||||
OpenAPI_list_for_each(policy_association_update_request->pra_statuses, node) {
|
||||
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
|
||||
ogs_free(localKeyValue->key);
|
||||
OpenAPI_presence_info_free(localKeyValue->value);
|
||||
ogs_free(localKeyValue);
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv4_addrs]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(alt_notif_ipv4_addrsList , ogs_strdup_or_assert(alt_notif_ipv4_addrs_local->valuestring));
|
||||
OpenAPI_list_add(alt_notif_ipv4_addrsList , ogs_strdup(alt_notif_ipv4_addrs_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_ipv6_addrs]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(alt_notif_ipv6_addrsList , ogs_strdup_or_assert(alt_notif_ipv6_addrs_local->valuestring));
|
||||
OpenAPI_list_add(alt_notif_ipv6_addrsList , ogs_strdup(alt_notif_ipv6_addrs_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -468,7 +468,7 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [alt_notif_fqdns]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(alt_notif_fqdnsList , ogs_strdup_or_assert(alt_notif_fqdns_local->valuestring));
|
||||
OpenAPI_list_add(alt_notif_fqdnsList , ogs_strdup(alt_notif_fqdns_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -546,9 +546,9 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
cJSON *localMapObject = pra_statuses_local_map;
|
||||
if (cJSON_IsObject(pra_statuses_local_map)) {
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
localMapObject->string, OpenAPI_presence_info_parseFromJSON(localMapObject));
|
||||
ogs_strdup(localMapObject->string), OpenAPI_presence_info_parseFromJSON(localMapObject));
|
||||
} else if (cJSON_IsNull(pra_statuses_local_map)) {
|
||||
localMapKeyPair = OpenAPI_map_create(localMapObject->string, NULL);
|
||||
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
|
||||
} else {
|
||||
ogs_error("OpenAPI_policy_association_update_request_parseFromJSON() failed [pra_statuses]");
|
||||
goto end;
|
||||
|
|
@ -692,7 +692,7 @@ OpenAPI_policy_association_update_request_t *OpenAPI_policy_association_update_r
|
|||
}
|
||||
|
||||
policy_association_update_request_local_var = OpenAPI_policy_association_update_request_create (
|
||||
notification_uri ? ogs_strdup_or_assert(notification_uri->valuestring) : NULL,
|
||||
notification_uri ? ogs_strdup(notification_uri->valuestring) : NULL,
|
||||
alt_notif_ipv4_addrs ? alt_notif_ipv4_addrsList : NULL,
|
||||
alt_notif_ipv6_addrs ? alt_notif_ipv6_addrsList : NULL,
|
||||
alt_notif_fqdns ? alt_notif_fqdnsList : NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue