<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13972">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo-stp: track the use of NULL talloc-context<br><br>Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13<br>---<br>M stp/stp_main.c<br>1 file changed, 11 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/13972/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/stp/stp_main.c b/stp/stp_main.c</span><br><span>index 3127321..04bca7c 100644</span><br><span>--- a/stp/stp_main.c</span><br><span>+++ b/stp/stp_main.c</span><br><span>@@ -160,6 +160,9 @@</span><br><span> {</span><br><span>    int rc;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   /* Track the use of NULL memory context */</span><br><span style="color: hsl(120, 100%, 40%);">+    talloc_enable_null_tracking();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     tall_stp_ctx = talloc_named_const(NULL, 1, "osmo-stp");</span><br><span>    msgb_talloc_ctx_init(tall_stp_ctx, 0);</span><br><span>       osmo_init_logging2(tall_stp_ctx, &log_info);</span><br><span>@@ -230,5 +233,13 @@</span><br><span>      talloc_report_full(tall_stp_ctx, stderr);</span><br><span>    talloc_free(tall_stp_ctx);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        /* FIXME: VTY code still uses NULL-context */</span><br><span style="color: hsl(120, 100%, 40%);">+ talloc_free(tall_vty_ctx);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Report state of NULL talloc-context, then free,</span><br><span style="color: hsl(120, 100%, 40%);">+     * so both ASAN and Valgrind are happy... */</span><br><span style="color: hsl(120, 100%, 40%);">+  talloc_report_full(NULL, stderr);</span><br><span style="color: hsl(120, 100%, 40%);">+     talloc_disable_null_tracking();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    return 0;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13972">change 13972</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/13972"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I89e7faf8469f5eba9599c9cbc1fec4fe583e7a13 </div>
<div style="display:none"> Gerrit-Change-Number: 13972 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>