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
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;
}