pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32124 )
Change subject: gmm: Free ms_fsm when freeing gmme ......................................................................
gmm: Free ms_fsm when freeing gmme
Change-Id: I0f2dd55bf0241a37a06e2ea438ca6ac2418eb7b8 --- M include/osmocom/gprs/gmm/gmm_ms_fsm.h M src/gmm/gmm.c M src/gmm/gmm_ms_fsm.c 3 files changed, 16 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/include/osmocom/gprs/gmm/gmm_ms_fsm.h b/include/osmocom/gprs/gmm/gmm_ms_fsm.h index 7aff7ab..dd22a32 100644 --- a/include/osmocom/gprs/gmm/gmm_ms_fsm.h +++ b/include/osmocom/gprs/gmm/gmm_ms_fsm.h @@ -53,3 +53,4 @@ void gprs_gmm_ms_fsm_set_log_cat(int logcat);
int gprs_gmm_ms_fsm_ctx_init(struct gprs_gmm_ms_fsm_ctx *ctx, struct gprs_gmm_entity *gmme); +void gprs_gmm_ms_fsm_ctx_release(struct gprs_gmm_ms_fsm_ctx *ctx); diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 2ac6e97..163bbe8 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -150,6 +150,7 @@ return;
LOGGMME(gmme, LOGL_DEBUG, "free()\n"); + gprs_gmm_ms_fsm_ctx_release(&gmme->ms_fsm); llist_del(&gmme->list); talloc_free(gmme); } diff --git a/src/gmm/gmm_ms_fsm.c b/src/gmm/gmm_ms_fsm.c index 72c6d15..423d1d0 100644 --- a/src/gmm/gmm_ms_fsm.c +++ b/src/gmm/gmm_ms_fsm.c @@ -289,3 +289,8 @@
return 0; } + +void gprs_gmm_ms_fsm_ctx_release(struct gprs_gmm_ms_fsm_ctx *ctx) +{ + osmo_fsm_inst_free(ctx->fi); +}