Change in osmo-bts[master]: osmo-bts-trx: fix potential NULL pointer dereference

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Oct 24 08:40:08 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25864 )

Change subject: osmo-bts-trx: fix potential NULL pointer dereference
......................................................................

osmo-bts-trx: fix potential NULL pointer dereference

Change-Id: Ic9c1f3a3fb9c151bba4f6c3e605746fc8d43f44f
Fixes: CID#240207
---
M src/osmo-bts-trx/trx_provision_fsm.c
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve



diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c
index 273b491..5deecd7 100644
--- a/src/osmo-bts-trx/trx_provision_fsm.c
+++ b/src/osmo-bts-trx/trx_provision_fsm.c
@@ -369,11 +369,13 @@
 
 	trx_provision_reset(l1h);
 
-	/* Apply initial RFMUTE state */
-	if (pinst->trx != NULL)
-		trx_if_cmd_rfmute(l1h, pinst->trx->mo.nm_state.administrative != NM_STATE_UNLOCKED);
-	else
+	if (pinst->trx == NULL) {
 		trx_if_cmd_rfmute(l1h, true);
+		return;
+	}
+
+	/* Apply initial RFMUTE state */
+	trx_if_cmd_rfmute(l1h, pinst->trx->mo.nm_state.administrative != NM_STATE_UNLOCKED);
 
 	osmo_fsm_inst_dispatch(pinst->trx->mo.fi, NM_EV_SW_ACT, NULL);
 	osmo_fsm_inst_dispatch(pinst->trx->bb_transc.mo.fi, NM_EV_SW_ACT, NULL);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25864
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic9c1f3a3fb9c151bba4f6c3e605746fc8d43f44f
Gerrit-Change-Number: 25864
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211024/e641d73b/attachment.htm>


More information about the gerrit-log mailing list