Harald Welte has submitted this change and it was merged.

Change subject: BSC: Fix bsc_subsc leak on paging
......................................................................


BSC: Fix bsc_subsc leak on paging

The OsmoBSC code contained a refcount leak on bsc_subscr in the paging
code.  For every PAGING command received from the MSC we consistently
leaked one refcount, resulting in a resulting memory leak.

Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50
Closes: OS#2780
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 6f2d0f4..5a4031c 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -333,6 +333,10 @@
        LOGP(DMSC, LOGL_INFO, "Paging request from MSC IMSI: '%s' TMSI: 
'0x%x/%u' LAC: 0x%x\n", mi_string, tmsi, tmsi, lac);
        bsc_grace_paging_request(msc->network->bsc_data->rf_ctrl->policy,
                                 subscr, chan_needed, msc);
+
+       /* the paging code has grabbed its own references */
+       bsc_subscr_put(subscr);
+
        return 0;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/5555
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d0fb406ca2a1042c6c3424e0dd263c1933b0d50
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to