lcs: fix bsc_subscr use_count leak
In lcs_ta_req_wait_ta_onenter(), fix use count leak of 'start-paging': get() the use count only after the early exits. osmo-ttcn3-hacks patch I69d4c5c6f8d499bb7f0b96a48af045361433c57b introduces testing against this leak in various LCS tests (e.g. BSC_Tests.TC_lcs_loc_req_for_active_ms_ta_req). Related: OS#5355 Change-Id: Ibbfbfe766eafe42c78048ec5b3b503a11ef5535d
This commit is contained in:
parent
3b4b7c1efd
commit
bd1eac2fb2
|
@ -122,17 +122,6 @@ void lcs_ta_req_wait_ta_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
|||
return;
|
||||
}
|
||||
|
||||
paging = (struct bsc_paging_params){
|
||||
.reason = BSC_PAGING_FOR_LCS,
|
||||
.msc = loc_req->conn->sccp.msc,
|
||||
.bsub = loc_req->conn->bsub,
|
||||
.tmsi = GSM_RESERVED_TMSI,
|
||||
.imsi = loc_req->req.imsi,
|
||||
.chan_needed = RSL_CHANNEED_ANY,
|
||||
};
|
||||
if (paging.bsub)
|
||||
bsc_subscr_get(paging.bsub, BSUB_USE_PAGING_START);
|
||||
|
||||
/* Do we already have an active lchan with knowledge of TA? */
|
||||
lchan = loc_req->conn->lchan;
|
||||
if (lchan) {
|
||||
|
@ -147,6 +136,17 @@ void lcs_ta_req_wait_ta_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
|||
return;
|
||||
}
|
||||
|
||||
paging = (struct bsc_paging_params){
|
||||
.reason = BSC_PAGING_FOR_LCS,
|
||||
.msc = loc_req->conn->sccp.msc,
|
||||
.bsub = loc_req->conn->bsub,
|
||||
.tmsi = GSM_RESERVED_TMSI,
|
||||
.imsi = loc_req->req.imsi,
|
||||
.chan_needed = RSL_CHANNEED_ANY,
|
||||
};
|
||||
if (paging.bsub)
|
||||
bsc_subscr_get(paging.bsub, BSUB_USE_PAGING_START);
|
||||
|
||||
if (!loc_req->req.cell_id_present) {
|
||||
LOG_LCS_TA_REQ(lcs_ta_req, LOGL_DEBUG,
|
||||
"No Cell Identity in BSSMAP Location Request, paging entire BSS\n");
|
||||
|
|
Loading…
Reference in New Issue