path: root/src/signal.c
diff options
authorHarald Welte <laforge@gnumonks.org>2019-03-20 11:26:58 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-21 16:02:31 +0000
commit8c58af139dccb418cc48e5bed5a370ed4dea2a85 (patch)
tree7d6efc6b7b2a3853bef4973090eb96690f0869e3 /src/signal.c
parent1688699c3f1272335132c9113bfd2337b39279af (diff)
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
Diffstat (limited to 'src/signal.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal.c b/src/signal.c
index 7e53e83d..be3b7778 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -52,7 +52,7 @@ struct signal_handler {
* \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;