From a8d896954d6c60f1940fcef4741b91b10fabc443 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 22 Dec 2017 22:15:08 +0100 Subject: 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 --- src/osmo-bsc/osmo_bsc_bssap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f2d0f4a0..5a4031c78 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -333,6 +333,10 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, 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; } -- cgit v1.2.3