<p>ipse has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18436">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc_subscr_conn_fsm: Fix crash in gscon_forget_lchan()<br><br>conn->fi might be NULL and thus can't be safely dereferenced.<br>E.g. we're checking if it's NULL or not just a few lines above. so we<br>should here as well.<br><br>Here is a backtrace for the crash:<br>(gdb) bt<br>    at fsm.c:748<br>    default_timeout=140730455622800, default_timeout@entry=5, file=file@entry=0x55b948079d39 "lchan_fsm.c", line=1344) at tdef.c:346<br><br>(gdb) p conn->fi<br>$1 = (struct osmo_fsm_inst *) 0x0<br><br>Change-Id: I2427266ef4660935cde899462fa6df8d785c420e<br>---<br>M src/osmo-bsc/bsc_subscr_conn_fsm.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/36/18436/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>index 0b475ff..3da9d66 100644</span><br><span>--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c</span><br><span>@@ -715,7 +715,7 @@</span><br><span>                                  osmo_fsm_inst_name(conn->fi), detach_label);</span><br><span>     }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (conn->fi->state != ST_CLEARING</span><br><span style="color: hsl(120, 100%, 40%);">+      if ((conn->fi && conn->fi->state != ST_CLEARING)</span><br><span>        && !conn->lchan</span><br><span>           && !conn->ho.new_lchan</span><br><span>            && !conn->assignment.new_lchan)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18436">change 18436</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-bsc/+/18436"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2427266ef4660935cde899462fa6df8d785c420e </div>
<div style="display:none"> Gerrit-Change-Number: 18436 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: ipse <Alexander.Chemeris@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>