Skip to content

Commit

Permalink
lightningd: close a take() leak.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Oct 25, 2017
1 parent 9e869e6 commit a2dc71b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,8 +2348,7 @@ static void peer_accept_channel(struct lightningd *ld,

/* FIXME: Only happens due to netaddr fail. */
if (!peer) {
errmsg = take(towire_errorfmt(ld, NULL,
"Can't resolve your address"));
errmsg = towire_errorfmt(ld, NULL, "Can't resolve your address");
goto peer_to_gossipd;
}

Expand Down Expand Up @@ -2411,6 +2410,7 @@ static void peer_accept_channel(struct lightningd *ld,
subd_send_msg(ld->gossip, take(msg));
subd_send_fd(ld->gossip, peer_fd);
close(gossip_fd);
tal_free(errmsg);
return;
}

Expand Down

0 comments on commit a2dc71b

Please sign in to comment.