hnbgw: remove close_cb() to fix a crash when releasing a hnbgw
The read callback should catch all errors already.
Previous when a read fails it:
* hnb_context_release() -> osmo_stream_srv_destroy() -> hnb_context_release()
On the second hnb_context_release() the hnbgw will crash because calling
llist_del() twice on the same object.
Fixes: OS#3416
Change-Id: Ic84b2184b7fc850c0de2acacf179e86771e17510
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index acc5aff..2a19dda 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -84,7 +84,7 @@
osmo_stream_srv_set_flush_and_destroy(ctx->conn);
} else {
/* The message was not queued. Destroy the connection right away. */
- hnb_context_release(ctx, true);
+ hnb_context_release(ctx);
}
}
@@ -401,7 +401,7 @@
hnbap_cause_str(&ies.cause));
hnbap_free_hnbde_registeries(&ies);
- hnb_context_release(ctx, true);
+ hnb_context_release(ctx);
return 0;
}