aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc
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 /include/osmocom/bsc
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 'include/osmocom/bsc')
-rw-r--r--include/osmocom/bsc/timeslot_fsm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/bsc/timeslot_fsm.h b/include/osmocom/bsc/timeslot_fsm.h
index f5e4b4ccb..1831537b1 100644
--- a/include/osmocom/bsc/timeslot_fsm.h
+++ b/include/osmocom/bsc/timeslot_fsm.h
@@ -45,6 +45,7 @@ enum ts_fsm_event {
void ts_fsm_init();
void ts_fsm_alloc(struct gsm_bts_trx_ts *ts);
+void ts_fsm_free(struct gsm_bts_trx_ts *ts);
bool ts_is_capable_of_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config pchan);
bool ts_is_capable_of_lchant(struct gsm_bts_trx_ts *ts, enum gsm_chan_t type);