<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/25778">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts-trx: Guard call to trx_sched_clean with NULL trx ptr<br><br>trx_phy_inst_open() already guards against NULL trx ptr when calling<br>trx_sched_init(). Later on, in same path, trx_phy_inst_close() can be<br>called which ends up calling trx_sched_clean(trx), this time not being<br>guarded against NULL trx. This fixes Coverity CID#240498.<br><br>Fixes: CID#240498<br>Change-Id: I00afc739559d57dd98db68c76f2a85006c15e875<br>---<br>M src/osmo-bts-trx/trx_if.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c</span><br><span>index f0c8746..914d0e1 100644</span><br><span>--- a/src/osmo-bts-trx/trx_if.c</span><br><span>+++ b/src/osmo-bts-trx/trx_if.c</span><br><span>@@ -1272,7 +1272,8 @@</span><br><span>    struct trx_l1h *l1h = pinst->u.osmotrx.hdl;</span><br><span> </span><br><span>   trx_if_close(l1h);</span><br><span style="color: hsl(0, 100%, 40%);">-      trx_sched_clean(pinst->trx);</span><br><span style="color: hsl(120, 100%, 40%);">+       if (pinst->trx)</span><br><span style="color: hsl(120, 100%, 40%);">+            trx_sched_clean(pinst->trx);</span><br><span> }</span><br><span> </span><br><span> /*! open the control + burst data sockets for one phy_instance */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/25778">change 25778</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bts/+/25778"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I00afc739559d57dd98db68c76f2a85006c15e875 </div>
<div style="display:none"> Gerrit-Change-Number: 25778 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>