mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 15:24:14 +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
|
|
@ -8,10 +8,9 @@ OpenAPI_spatial_validity_t *OpenAPI_spatial_validity_create(
|
|||
OpenAPI_list_t* presence_info_list
|
||||
)
|
||||
{
|
||||
OpenAPI_spatial_validity_t *spatial_validity_local_var = OpenAPI_malloc(sizeof(OpenAPI_spatial_validity_t));
|
||||
if (!spatial_validity_local_var) {
|
||||
return NULL;
|
||||
}
|
||||
OpenAPI_spatial_validity_t *spatial_validity_local_var = ogs_malloc(sizeof(OpenAPI_spatial_validity_t));
|
||||
ogs_assert(spatial_validity_local_var);
|
||||
|
||||
spatial_validity_local_var->presence_info_list = presence_info_list;
|
||||
|
||||
return spatial_validity_local_var;
|
||||
|
|
@ -25,6 +24,7 @@ void OpenAPI_spatial_validity_free(OpenAPI_spatial_validity_t *spatial_validity)
|
|||
OpenAPI_lnode_t *node;
|
||||
OpenAPI_list_for_each(spatial_validity->presence_info_list, node) {
|
||||
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
|
||||
ogs_free(localKeyValue->key);
|
||||
OpenAPI_presence_info_free(localKeyValue->value);
|
||||
ogs_free(localKeyValue);
|
||||
}
|
||||
|
|
@ -88,9 +88,9 @@ OpenAPI_spatial_validity_t *OpenAPI_spatial_validity_parseFromJSON(cJSON *spatia
|
|||
cJSON *localMapObject = presence_info_list_local_map;
|
||||
if (cJSON_IsObject(presence_info_list_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(presence_info_list_local_map)) {
|
||||
localMapKeyPair = OpenAPI_map_create(localMapObject->string, NULL);
|
||||
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
|
||||
} else {
|
||||
ogs_error("OpenAPI_spatial_validity_parseFromJSON() failed [presence_info_list]");
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue