pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15166


Change subject: gprs_sgsn.c: Warn upon llme free unexpected scenarios
......................................................................

gprs_sgsn.c: Warn upon llme free unexpected scenarios

May be useful to detect unexpected conditions which could end up in
memory leaks.

Related: OS#3957
Change-Id: I0d175501083ce458ff1c07ad38761d2cbf4ea470
---
M src/gprs/gprs_sgsn.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/66/15166/1

diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index e01bc5c..8f1e54a 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -362,7 +362,9 @@

        if (llme) {
                /* TLLI unassignment, must be called after sgsn_mm_ctx_free */
-               gprs_llgmm_assign(llme, tlli, TLLI_UNASSIGNED);
+               OSMO_ASSERT(llme->tlli == tlli);
+               if (gprs_llgmm_unassign(llme) < 0)
+                       LOGMMCTXP(LOGL_ERROR, mm, "gprs_llgmm_unassign failed, 
llme not freed!\n");
        }
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15166
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I0d175501083ce458ff1c07ad38761d2cbf4ea470
Gerrit-Change-Number: 15166
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to