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

@ -9,10 +9,9 @@ OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_create(
char *ipv6_prefix
)
{
OpenAPI_frame_route_info_1_t *frame_route_info_1_local_var = OpenAPI_malloc(sizeof(OpenAPI_frame_route_info_1_t));
if (!frame_route_info_1_local_var) {
return NULL;
}
OpenAPI_frame_route_info_1_t *frame_route_info_1_local_var = ogs_malloc(sizeof(OpenAPI_frame_route_info_1_t));
ogs_assert(frame_route_info_1_local_var);
frame_route_info_1_local_var->ipv4_mask = ipv4_mask;
frame_route_info_1_local_var->ipv6_prefix = ipv6_prefix;
@ -80,8 +79,8 @@ OpenAPI_frame_route_info_1_t *OpenAPI_frame_route_info_1_parseFromJSON(cJSON *fr
}
frame_route_info_1_local_var = OpenAPI_frame_route_info_1_create (
ipv4_mask ? ogs_strdup_or_assert(ipv4_mask->valuestring) : NULL,
ipv6_prefix ? ogs_strdup_or_assert(ipv6_prefix->valuestring) : NULL
ipv4_mask ? ogs_strdup(ipv4_mask->valuestring) : NULL,
ipv6_prefix ? ogs_strdup(ipv6_prefix->valuestring) : NULL
);
return frame_route_info_1_local_var;