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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-12-27 06:40:03 +10:30
committed by Christian Decker
parent 7314c71695
commit b155dbb316

View File

@@ -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: