From be501f3119065e043e28d94647da64105f914cc1 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 12 Sep 2022 08:54:45 +0200 Subject: [PATCH] hnbgw_rx_hnb_deregister: Don't call hnb_context_release() Don't release the HNB context as there's plenty of code that assumes there's always a HNB context associated with a SCTP connection. Instead, simply unset the hnb_registered flag in the context when processing a HNB_DE-REGISTER. Related: OS#5676 Change-Id: Id5c4f5c900ea049f54afbf58edb84b4dc00b1dcb --- src/osmo-hnbgw/hnbgw_hnbap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c index 98cec76..1d81e83 100644 --- a/src/osmo-hnbgw/hnbgw_hnbap.c +++ b/src/osmo-hnbgw/hnbgw_hnbap.c @@ -388,7 +388,7 @@ static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in) LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-DE-REGISTER cause=%s\n", hnbap_cause_str(&ies.cause)); hnbap_free_hnbde_registeries(&ies); - hnb_context_release(ctx); + ctx->hnb_registered = false; return 0; }