From b155dbb316eefd07a57d422572cbdff80fe59b13 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 27 Dec 2018 06:40:03 +1030 Subject: [PATCH] openingd: make sure we take utxos on success. Otherwise recent additional checks in tal() complain that we're freeing a take() pointer. In this case, we're exiting so it's harmless, but it's still a latent bug. Signed-off-by: Rusty Russell --- openingd/openingd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openingd/openingd.c b/openingd/openingd.c index dc9441c42..67ecc1bdc 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -778,6 +778,9 @@ static u8 *funder_channel(struct state *state, peer_billboard(false, "Funding channel: opening negotiation succeeded"); + if (taken(utxos)) + tal_free(utxos); + /* BOLT #2: * * The recipient: