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

@ -10,10 +10,9 @@ OpenAPI_route_information_t *OpenAPI_route_information_create(
int port_number
)
{
OpenAPI_route_information_t *route_information_local_var = OpenAPI_malloc(sizeof(OpenAPI_route_information_t));
if (!route_information_local_var) {
return NULL;
}
OpenAPI_route_information_t *route_information_local_var = ogs_malloc(sizeof(OpenAPI_route_information_t));
ogs_assert(route_information_local_var);
route_information_local_var->ipv4_addr = ipv4_addr;
route_information_local_var->ipv6_addr = ipv6_addr;
route_information_local_var->port_number = port_number;
@ -98,8 +97,8 @@ OpenAPI_route_information_t *OpenAPI_route_information_parseFromJSON(cJSON *rout
}
route_information_local_var = OpenAPI_route_information_create (
ipv4_addr ? ogs_strdup_or_assert(ipv4_addr->valuestring) : NULL,
ipv6_addr ? ogs_strdup_or_assert(ipv6_addr->valuestring) : NULL,
ipv4_addr ? ogs_strdup(ipv4_addr->valuestring) : NULL,
ipv6_addr ? ogs_strdup(ipv6_addr->valuestring) : NULL,
port_number->valuedouble
);