From ff2fbdf9984c7780811f19fa41149a76574f7eb9 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 10 Jun 2022 11:39:55 +0200 Subject: [PATCH] fix segfault in error handling for mgw_fi == NULL In mgw_fsm_handle_rab_ass_resp(), a NULL mgw_fi is handled as error, but the error handling fails to return. The function continues to dereference mgw_fi. Add missing return. Related: SYS#5995 Change-Id: I3e98dc3a00145ec1f71c678bbf45debfd4276237 --- src/osmo-hnbgw/mgw_fsm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c index d90571b..b84d87e 100644 --- a/src/osmo-hnbgw/mgw_fsm.c +++ b/src/osmo-hnbgw/mgw_fsm.c @@ -767,6 +767,7 @@ int mgw_fsm_handle_rab_ass_resp(struct hnbgw_context_map *map, struct osmo_prim_ /* Send a release request, to make sure that the MSC is aware of the problem. */ tx_release_req(map); + return -1; } mgw_fsm_priv = map->mgw_fi->priv;