<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/15281">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_bssgp_destroy(): fix NULL-pointer dereference<br><br>The 'gprs_bssgp_pcu' may not be initialized in some cases, e.g.<br>when OsmoPCU is terminated before connecting to the SGSN.<br><br>Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9<br>---<br>M src/gprs_bssgp_pcu.cpp<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/81/15281/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp</span><br><span>index ddf5174..ade9879 100644</span><br><span>--- a/src/gprs_bssgp_pcu.cpp</span><br><span>+++ b/src/gprs_bssgp_pcu.cpp</span><br><span>@@ -975,7 +975,8 @@</span><br><span>        gprs_ns_destroy(nsi);</span><br><span> </span><br><span>    /* FIXME: move this to libgb: btsctx_free() */</span><br><span style="color: hsl(0, 100%, 40%);">-  llist_del(&the_pcu.bctx->list);</span><br><span style="color: hsl(120, 100%, 40%);">+        if (the_pcu.bctx != NULL)</span><br><span style="color: hsl(120, 100%, 40%);">+             llist_del(&the_pcu.bctx->list);</span><br><span> #warning "This causes ASAN to complain. It is not critical for normal operation but should be fixed nevertheless"</span><br><span> #if 0</span><br><span>       talloc_free(the_pcu.bctx);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/15281">change 15281</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-pcu/+/15281"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 </div>
<div style="display:none"> Gerrit-Change-Number: 15281 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>