summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-02 10:37:58 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-08 19:35:19 +0000
commit3de97e192688b75a24077bb7072030f4a4dc5ef3 (patch)
tree7eaa4cf33153e725dc54df488ff4d5b45f4ae114 /src
parente9e5f8e4e9aa3fdce06d144381d9621552476387 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/fsm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fsm.c b/src/fsm.c
index f525f400..9dc6b987 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -233,6 +233,7 @@ struct osmo_fsm_inst *osmo_fsm_inst_alloc_child(struct osmo_fsm *fsm,
*/
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);