From 99289bece7486eb571fb13455518c5b894005c92 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 27 Jun 2017 06:51:52 +0930 Subject: [PATCH] lightningd/peer_control.c: fix memleak. Reported-by: Christian Decker Signed-off-by: Rusty Russell --- lightningd/peer_control.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 280972ab3..be2f377a1 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -1134,6 +1134,7 @@ static bool peer_start_channeld(struct peer *peer, log_unusual(peer->log, "Could not subdaemon channel: %s", strerror(errno)); peer_fail_transient(peer, "Failed to subdaemon channel"); + tal_free(tmpctx); return true; } @@ -1199,6 +1200,7 @@ static bool peer_start_channeld(struct peer *peer, /* We don't expect a response: we are triggered by funding_depth_cb. */ subd_send_msg(peer->owner, take(initmsg)); + tal_free(tmpctx); return true; }