From 445bf26ef2a8e41fbd86e608665b7fbae6d38384 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Mon, 25 Sep 2023 22:33:03 +0900 Subject: [PATCH] [AUSF] Fixed crash due to ausf_ue_add (#2637) --- src/ausf/ausf-sm.c | 1 - src/ausf/context.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ausf/ausf-sm.c b/src/ausf/ausf-sm.c index ed63a0182..9aab54a84 100644 --- a/src/ausf/ausf-sm.c +++ b/src/ausf/ausf-sm.c @@ -129,7 +129,6 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e) if (!ausf_ue) { ausf_ue = ausf_ue_add( message.AuthenticationInfo->supi_or_suci); - ogs_assert(ausf_ue); } } break; diff --git a/src/ausf/context.c b/src/ausf/context.c index 478e3becd..29ffaf9f1 100644 --- a/src/ausf/context.c +++ b/src/ausf/context.c @@ -126,6 +126,10 @@ ausf_ue_t *ausf_ue_add(char *suci) ogs_assert(suci); ogs_pool_alloc(&ausf_ue_pool, &ausf_ue); + if (!ausf_ue) { + ogs_error("ogs_pool_alloc() failed"); + return NULL; + } ogs_assert(ausf_ue); memset(ausf_ue, 0, sizeof *ausf_ue);