Browse Source

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 <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
a7e6cdb418
  1. 2
      gossipd/gossip.c

2
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;
}

Loading…
Cancel
Save