Add logging and testing for FSM deallocation
osmo_fsm_inst_alloc() logs allocation but osmo_fsm_inst_free() is
silent. Fix this by adding log message for deallocation to make FSM
lifecycle tracking easier. Also make sure it's covered by test suite.
Change-Id: I7e5b55a1fff8e36cf61c7fb61d3e79c1f00e29d2
diff --git a/src/fsm.c b/src/fsm.c
index f525f40..9dc6b98 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -233,6 +233,7 @@
*/
void osmo_fsm_inst_free(struct osmo_fsm_inst *fi)
{
+ LOGPFSM(fi, "Deallocated\n");
osmo_timer_del(&fi->timer);
llist_del(&fi->list);
talloc_free(fi);