Change in osmo-bts[master]: bts-trx: Guard call to trx_sched_clean with NULL trx ptr

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
Wed Oct 13 19:58:23 UTC 2021


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

Change subject: bts-trx: Guard call to trx_sched_clean with NULL trx ptr
......................................................................

bts-trx: Guard call to trx_sched_clean with NULL trx ptr

trx_phy_inst_open() already guards against NULL trx ptr when calling
trx_sched_init(). Later on, in same path, trx_phy_inst_close() can be
called which ends up calling trx_sched_clean(trx), this time not being
guarded against NULL trx. This fixes Coverity CID#240498.

Fixes: CID#240498
Change-Id: I00afc739559d57dd98db68c76f2a85006c15e875
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index f0c8746..914d0e1 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -1272,7 +1272,8 @@
 	struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
 
 	trx_if_close(l1h);
-	trx_sched_clean(pinst->trx);
+	if (pinst->trx)
+		trx_sched_clean(pinst->trx);
 }
 
 /*! open the control + burst data sockets for one phy_instance */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I00afc739559d57dd98db68c76f2a85006c15e875
Gerrit-Change-Number: 25778
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211013/731f96ad/attachment.htm>


More information about the gerrit-log mailing list