aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts_trx.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-05 19:31:11 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-07 14:07:52 +0200
commit7974008436a910f008eb42611014ce9c385a16ae (patch)
treeaa35971de54780d021f455c36b9162523270fa44 /src/osmo-bsc/bts_trx.c
parentd203d173f255d276b2e1a5ff290a2aab91419ab9 (diff)
bts_trx: Fix timeslot_fsm not properly freed during trx free() [1/4]
osmo_fsm_inst_free() must be called explicitly, otherwise the instance is kept in the llist of instances and produces heap-use-after-free. Note: This fix is required by follow-up patches where some stubs are removed and hence some tests start using FSMs internally. Due to this bug, tests will crash due to reason explain in previous paragraph. This patch itself may introduced failures to build due to some new interdependencies being introduced in same follow-up patches mentioned above, which are in turn fixed by this present patch. So they are expected to be merged together. Change-Id: Ib0e5560efe518833f76f846d7269e82d85c186a1
Diffstat (limited to 'src/osmo-bsc/bts_trx.c')
-rw-r--r--src/osmo-bsc/bts_trx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index 9f8837b0b..9b90c91d7 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -50,6 +50,7 @@ static int gsm_bts_trx_talloc_destructor(struct gsm_bts_trx *trx)
osmo_fsm_inst_free(ts->mo.fi);
ts->mo.fi = NULL;
}
+ ts_fsm_free(ts);
}
return 0;
}