mgcp_client_fsm delete: set mgcp_client as ctx, not NULL
Upon mgcp_conn_delete(), we unparent the FSM instance. Instead of
setting the talloc ctx to NULL, place the deleting conn under the
struct mgcp_client talloc ctx.
Related: SYS#5529
Change-Id: Ia12749e0d7d520f24a967c2df9a4651267e1019e
diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index 1c0cd59..57c6d98 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -709,8 +709,8 @@
if (fi->proc.terminating)
return;
- /* Unlink FSM from parent */
- osmo_fsm_inst_unlink_parent(fi, NULL);
+ /* Unlink FSM from parent, set the struct mgcp_client as new talloc ctx. */
+ osmo_fsm_inst_unlink_parent(fi, mgcp_ctx->mgcp);
/* An error situation where the parent FSM must be killed immediately
* may lead into a situation where the DLCX can not be executed right