bugfix: variable was on the stack
Guess what happens when we return from the function...
This commit is contained in:
@@ -271,6 +271,9 @@ void *nas_ue_task(void *args_p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(users);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nas_user_t *find_user_from_fd(nas_user_container_t *users, int fd) {
|
||||
|
||||
@@ -85,9 +85,10 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
if (ue_nb > 0) {
|
||||
nas_user_container_t users;
|
||||
users.count = ue_nb;
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, &users) < 0) {
|
||||
nas_user_container_t *users = calloc(1, sizeof(*users));
|
||||
if (users == NULL) abort();
|
||||
users->count = ue_nb;
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user