aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_subscr_conn_fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libbsc/bsc_subscr_conn_fsm.c')
-rw-r--r--src/libbsc/bsc_subscr_conn_fsm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index b5e7e7d8e..91d4e5984 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -1028,12 +1028,6 @@ static void gscon_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cau
conn->lchan = NULL;
}
- if (conn->bsub) {
- LOGPFSML(fi, LOGL_DEBUG, "Putting bsc_subscr\n");
- bsc_subscr_put(conn->bsub);
- conn->bsub = NULL;
- }
-
if (conn->sccp.state != SUBSCR_SCCP_ST_NONE) {
LOGPFSML(fi, LOGL_DEBUG, "Disconnecting SCCP\n");
struct bsc_msc_data *msc = conn->sccp.msc;
@@ -1047,6 +1041,12 @@ static void gscon_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cau
penalty_timers_free(&conn->hodec2.penalty_timers);
+ if (conn->bsub) {
+ LOGPFSML(fi, LOGL_DEBUG, "Putting bsc_subscr\n");
+ bsc_subscr_put(conn->bsub);
+ conn->bsub = NULL;
+ }
+
llist_del(&conn->entry);
talloc_free(conn);
fi->priv = NULL;