commit_tx: free temporary wscript, rather than leaving attached to tx.

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 b768de324c
commit 319eef266d

View File

@@ -203,7 +203,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
if (!htlc_has(h, committed_flag))
continue;
wscript = wscript_for_htlc(tx, peer, h, rhash, side);
wscript = wscript_for_htlc(tmpctx, peer, h, rhash, side);
/* If we pay any HTLC, it's txout is not just to other side. */
if (add_output(tx, scriptpubkey_p2wsh(tmpctx, wscript),
h->msatoshi / 1000, &total)) {