From 319eef266dee6b516b5605ec12d30d9221ffa6cc Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 4 Nov 2016 11:17:03 +1030 Subject: [PATCH] commit_tx: free temporary wscript, rather than leaving attached to tx. Signed-off-by: Rusty Russell --- daemon/commit_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/commit_tx.c b/daemon/commit_tx.c index 2ae4ef626..0be4a845c 100644 --- a/daemon/commit_tx.c +++ b/daemon/commit_tx.c @@ -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)) {