aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-09 17:03:25 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-09 17:03:35 +0200
commitb5bad2073127c0d6cbbd089b2107ec2e2d9b2a0d (patch)
treea76a330b59b4990c41cd1ac7f92b8dbff0deb507
parentabed2e326d1ad0d6fff3d8acf8c6494375d613b2 (diff)
tbf: Assert if FSM allocation fails
-rw-r--r--src/tbf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index bda96afe..7ebd2689 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -122,13 +122,16 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms, gprs_
memset(&state_fsm, 0, sizeof(state_fsm));
state_fsm.tbf = this;
state_fsm.fi = osmo_fsm_inst_alloc(&tbf_fsm, this, &state_fsm, LOGL_INFO, NULL);
+ OSMO_ASSERT(state_fsm.fi);
memset(&ul_ass_fsm, 0, sizeof(ul_ass_fsm));
ul_ass_fsm.tbf = this;
ul_ass_fsm.fi = osmo_fsm_inst_alloc(&tbf_ul_ass_fsm, this, &ul_ass_fsm, LOGL_INFO, NULL);
+ OSMO_ASSERT(ul_ass_fsm.fi);
memset(&dl_ass_fsm, 0, sizeof(dl_ass_fsm));
dl_ass_fsm.tbf = this;
dl_ass_fsm.fi = osmo_fsm_inst_alloc(&tbf_dl_ass_fsm, this, &dl_ass_fsm, LOGL_INFO, NULL);
+ OSMO_ASSERT(dl_ass_fsm.fi);
m_rlc.init();
m_llc.init();