Change in libosmocore[master]: signal.c: Fix osmo_signal_talloc_ctx_init()

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 21 16:02:31 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13336 )

Change subject: signal.c: Fix osmo_signal_talloc_ctx_init()
......................................................................

signal.c: Fix osmo_signal_talloc_ctx_init()

This function is broken ever since it was added back in 2018 in commit
Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09

Rather than allocating from the user-supplied 'root_ctx', it is
allocating from the context that it's trying to create (which is
NULL at that time, rendering the entire operation more or less
a no-op.  For sure you will not see osmo_signal structures never in
any talloc report.

Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f
---
M src/signal.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Vadim Yanitskiy: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/signal.c b/src/signal.c
index 7e53e83..be3b777 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -52,7 +52,7 @@
  *  \returns the new osmo_signal talloc context, e.g. for reporting
  */
 void *osmo_signal_talloc_ctx_init(void *root_ctx) {
-	tall_sigh_ctx = talloc_named_const(tall_sigh_ctx, 0, "osmo_signal");
+	tall_sigh_ctx = talloc_named_const(root_ctx, 0, "osmo_signal");
 	return tall_sigh_ctx;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/13336
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f
Gerrit-Change-Number: 13336
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Assignee: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190321/c5568c84/attachment.html>


More information about the gerrit-log mailing list