From a7e6cdb41878d51e9d1812441e2d0b2652604c59 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 14 Jun 2018 12:29:27 +0930 Subject: [PATCH] gossipd: peer->local->peer_out queue should have lifetime of peer->local. The current code attaches it to peer, which is a slight leak. Signed-off-by: Rusty Russell --- gossipd/gossip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/gossip.c b/gossipd/gossip.c index 622f829ad..a2d02f19e 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -353,7 +353,7 @@ new_local_peer_state(struct peer *peer, const struct crypto_state *cs) lps->pcs.cs = *cs; lps->return_to_master = false; lps->num_pings_outstanding = 0; - msg_queue_init(&lps->peer_out, peer); + msg_queue_init(&lps->peer_out, lps); return lps; }