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
This commit is contained in:
Harald Welte 2017-12-22 22:15:08 +01:00
parent 7c29b094d5
commit a8d896954d
1 changed files with 4 additions and 0 deletions

View File

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