diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-12 18:31:22 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-12 18:33:39 +0200 |
commit | 788863cda53298c24110d0fe0f8cd3309cdec747 (patch) | |
tree | a179fee5dd06897597ec42cea4c1f0f897a0b1ab /src/gprs | |
parent | 404d9b8bbaf8f06afa0ccba6a8a5e96eccf7a553 (diff) |
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
Diffstat (limited to 'src/gprs')
-rw-r--r-- | src/gprs/gprs_sgsn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index e01bc5c90..8f1e54a9c 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -362,7 +362,9 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) 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"); } } |