laforge submitted this change.
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
---
M src/osmo-bsc/lcs_ta_req.c
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/osmo-bsc/lcs_ta_req.c b/src/osmo-bsc/lcs_ta_req.c
index 6252d46..f0bb02e 100644
--- a/src/osmo-bsc/lcs_ta_req.c
+++ b/src/osmo-bsc/lcs_ta_req.c
@@ -122,17 +122,6 @@
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 @@
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");
To view, visit change 26611. To unsubscribe, or for help writing mail filters, visit settings.