From 78771ca3714b296b8c0bdac309edfc0a7a1bbe04 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 22 Nov 2018 09:09:31 +1030 Subject: [PATCH] gossipd: mark timers as not being leaks. Signed-off-by: Rusty Russell --- gossipd/gossipd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index df2e41903..5fe32613c 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1762,9 +1763,9 @@ static void gossip_refresh_network(struct daemon *daemon) struct node *n; /* Schedule next run now (prune_timeout is 2 weeks) */ - new_reltimer(&daemon->timers, daemon, - time_from_sec(daemon->rstate->prune_timeout/4), - gossip_refresh_network, daemon); + notleak(new_reltimer(&daemon->timers, daemon, + time_from_sec(daemon->rstate->prune_timeout/4), + gossip_refresh_network, daemon)); /* Find myself in the network */ n = get_node(daemon->rstate, &daemon->id); @@ -1852,9 +1853,9 @@ static struct io_plan *gossip_init(struct io_conn *conn, maybe_send_own_node_announce(daemon); /* Start the weekly refresh timer. */ - new_reltimer(&daemon->timers, daemon, - time_from_sec(daemon->rstate->prune_timeout/4), - gossip_refresh_network, daemon); + notleak(new_reltimer(&daemon->timers, daemon, + time_from_sec(daemon->rstate->prune_timeout/4), + gossip_refresh_network, daemon)); return daemon_conn_read_next(conn, daemon->master); }