Browse Source

lightningd: close a take() leak.

test_routing_gossip (__main__.LightningDTests) ... lightningd: Outstanding taken pointers: lightningd/peer_control.c:2352:towire_errorfmt(ld, ((void *)0), "Can't resolve your address")

This caused by the other end closing due to the next bug.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
a2dc71b0a1
  1. 4
      lightningd/peer_control.c

4
lightningd/peer_control.c

@ -2348,8 +2348,7 @@ static void peer_accept_channel(struct lightningd *ld,
/* FIXME: Only happens due to netaddr fail. */ /* FIXME: Only happens due to netaddr fail. */
if (!peer) { if (!peer) {
errmsg = take(towire_errorfmt(ld, NULL, errmsg = towire_errorfmt(ld, NULL, "Can't resolve your address");
"Can't resolve your address"));
goto peer_to_gossipd; goto peer_to_gossipd;
} }
@ -2411,6 +2410,7 @@ peer_to_gossipd:
subd_send_msg(ld->gossip, take(msg)); subd_send_msg(ld->gossip, take(msg));
subd_send_fd(ld->gossip, peer_fd); subd_send_fd(ld->gossip, peer_fd);
close(gossip_fd); close(gossip_fd);
tal_free(errmsg);
return; return;
} }

Loading…
Cancel
Save