path: root/src
diff options
authorHarald Welte <laforge@gnumonks.org>2017-12-22 22:15:08 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-22 22:15:08 +0100
commita8d896954d6c60f1940fcef4741b91b10fabc443 (patch)
tree66c823eb893689e81aa64f721db2e9d0c145156a /src
parent7c29b094d56c9c4949f05b95eff2d24cfa8f0de8 (diff)
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
Diffstat (limited to 'src')
1 files changed, 4 insertions, 0 deletions
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);
subscr, chan_needed, msc);
+ /* the paging code has grabbed its own references */
+ bsc_subscr_put(subscr);
return 0;