pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32375 )
Change subject: bts: free MS object after allocating it if no tbf becomes attached
......................................................................
bts: free MS object after allocating it if no tbf becomes attached
Since no TBF is attached, it means it won't be freed automatically since
the refcounting is never increased, and hence it needs to be freed
manually.
In any case, it makes no sense to keep the MS object around since it has
no relevant information at that point in time yet.
Related: OS#6002
Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
---
M src/bts.cpp
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/32375/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 40541c5..c9a078a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1010,6 +1010,8 @@
ms_set_egprs_ms_class(ms, chan_req.egprs_mslot_class);
tbf = ms_new_ul_tbf_assigned_agch(ms);
if (!tbf) {
+ /* Release the MS just allocated since no TBF was attached */
+ talloc_free(ms);
/* Send RR Immediate Assignment Reject */
rc = -EBUSY;
goto send_imm_ass_rej;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32375
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
Gerrit-Change-Number: 32375
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange