script: free redeemscript in bitcoin_witness_p2sh_p2wpkh

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-04 11:17:03 +10:30
parent e0368cc82d
commit 78a0177f1c

View File

@ -248,6 +248,7 @@ void bitcoin_witness_p2sh_p2wpkh(const tal_t *ctx,
input->script = tal_arr(ctx, u8, 0);
add_push_bytes(&input->script, redeemscript, tal_count(redeemscript));
input->script_length = tal_count(input->script);
tal_free(redeemscript);
/* BIP141: The witness must consist of exactly 2 items (≤ 520
* bytes each). The first one a signature, and the second one