fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-msc/+/39976?usp=email )
Change subject: gsm0911_rcv_nc_ss(): avoid assertion failure in msc_a_put()
......................................................................
gsm0911_rcv_nc_ss(): avoid assertion failure in msc_a_put()
Change-Id: I724f0f0c9ef8611d3c3653e9370361b252127f72
Related: osmo-ttcn3-hacks.git If1d85a1b4b63b01b4565e53677acfd21e664e799
Related: OS#6756
---
M src/libmsc/gsm_09_11.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/39976/1
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 442995e..508144a 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -144,7 +144,8 @@
GSM0480_MTYPE_RELEASE_COMPLETE);
/* Decrement use counter that has been incremented by CM Service Request (SS).
* If there is no other service request, the BSS connection will be released. */
- msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS);
+ if (osmo_use_count_by(&msc_a->use_count, MSC_A_USE_CM_SERVICE_SS))
+ msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS);
return -EINVAL;
}
@@ -156,7 +157,8 @@
GSM0480_MTYPE_RELEASE_COMPLETE);
/* Decrement use counter that has been incremented by CM Service Request (SS).
* If there is no other service request, the BSS connection will be released. */
- msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS);
+ if (osmo_use_count_by(&msc_a->use_count, MSC_A_USE_CM_SERVICE_SS))
+ msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS);
return -ENOMEM;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-msc/+/39976?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I724f0f0c9ef8611d3c3653e9370361b252127f72
Gerrit-Change-Number: 39976
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>