<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24908">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lchan_fsm: fix potential NULL-pointer dereference<br><br>Change-Id: I373855b95f8bde0ce8f9c2ae7bf95c9135d33484<br>Related: SYS#5526<br>---<br>M src/osmo-bsc/lchan_fsm.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/08/24908/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c</span><br><span>index 841415f..e956a49 100644</span><br><span>--- a/src/osmo-bsc/lchan_fsm.c</span><br><span>+++ b/src/osmo-bsc/lchan_fsm.c</span><br><span>@@ -142,8 +142,11 @@</span><br><span>        case ACTIVATE_FOR_ASSIGNMENT:</span><br><span>                LOG_LCHAN(lchan, LOGL_NOTICE, "Signalling Assignment FSM of error (%s)\n",</span><br><span>                           lchan->last_error ? : "unknown error");</span><br><span style="color: hsl(0, 100%, 40%);">-          _osmo_fsm_inst_dispatch(for_conn->assignment.fi, ASSIGNMENT_EV_LCHAN_ERROR, lchan,</span><br><span style="color: hsl(0, 100%, 40%);">-                                   file, line);</span><br><span style="color: hsl(120, 100%, 40%);">+          if (for_conn != NULL && for_conn->assignment.fi != NULL) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 _osmo_fsm_inst_dispatch(for_conn->assignment.fi,</span><br><span style="color: hsl(120, 100%, 40%);">+                                           ASSIGNMENT_EV_LCHAN_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            lchan, file, line);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span>            return;</span><br><span> </span><br><span>  case ACTIVATE_FOR_HANDOVER:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24908">change 24908</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/+/24908"/><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: I373855b95f8bde0ce8f9c2ae7bf95c9135d33484 </div>
<div style="display:none"> Gerrit-Change-Number: 24908 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>