diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-07-24 19:04:47 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2018-07-24 19:08:19 +0200 |
commit | ad4ea3b10e66bbd5cad27d16532b0c5fc239946a (patch) | |
tree | 87bd8a9d78bc808a6fef9764d0016d56f9840b28 /src/hnbgw_hnbap.c | |
parent | 7a97fcafedead40b311eef65467480bd72fdd18b (diff) |
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
Diffstat (limited to 'src/hnbgw_hnbap.c')
-rw-r--r-- | src/hnbgw_hnbap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ static int hnbgw_tx_hnb_register_rej(struct hnb_context *ctx) 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 @@ static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in) hnbap_cause_str(&ies.cause)); hnbap_free_hnbde_registeries(&ies); - hnb_context_release(ctx, true); + hnb_context_release(ctx); return 0; } |