mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
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>
This commit is contained in:
parent
9e869e641a
commit
a2dc71b0a1
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -2411,6 +2410,7 @@ peer_to_gossipd:
|
|||
subd_send_msg(ld->gossip, take(msg));
|
||||
subd_send_fd(ld->gossip, peer_fd);
|
||||
close(gossip_fd);
|
||||
tal_free(errmsg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue