<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13336">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">signal.c: Fix osmo_signal_talloc_ctx_init()<br><br>This function is broken ever since it was added back in 2018 in commit<br>Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09<br><br>Rather than allocating from the user-supplied 'root_ctx', it is<br>allocating from the context that it's trying to create (which is<br>NULL at that time, rendering the entire operation more or less<br>a no-op.  For sure you will not see osmo_signal structures never in<br>any talloc report.<br><br>Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f<br>---<br>M src/signal.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/libosmocore refs/changes/36/13336/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/signal.c b/src/signal.c</span><br><span>index 188876b..2302788 100644</span><br><span>--- a/src/signal.c</span><br><span>+++ b/src/signal.c</span><br><span>@@ -52,7 +52,7 @@</span><br><span>  *  \returns the new osmo_signal talloc context, e.g. for reporting</span><br><span>  */</span><br><span> void *osmo_signal_talloc_ctx_init(void *root_ctx) {</span><br><span style="color: hsl(0, 100%, 40%);">-      tall_sigh_ctx = talloc_named_const(tall_sigh_ctx, 0, "osmo_signal");</span><br><span style="color: hsl(120, 100%, 40%);">+        tall_sigh_ctx = talloc_named_const(root_ctx, 0, "osmo_signal");</span><br><span>    return tall_sigh_ctx;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13336">change 13336</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/13336"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f </div>
<div style="display:none"> Gerrit-Change-Number: 13336 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>