onchaind: fix minor leaks.

Not actually leaks, but they do live longer than they need.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-02-26 11:20:33 +10:30
parent c5b424b6ce
commit f0ea4d60b9
4 changed files with 5 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ done:
}
int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script,
u8 *wscript, struct amount_sat amount)
const u8 *wscript, struct amount_sat amount)
{
size_t i = tx->wtx->num_outputs;
struct wally_tx_output *output;
@@ -197,7 +197,7 @@ int bitcoin_tx_add_input(struct bitcoin_tx *tx,
input_wscript, NULL);
if (input_wscript) {
scriptPubkey = scriptpubkey_p2wsh(tx->psbt, input_wscript);
scriptPubkey = scriptpubkey_p2wsh(tmpctx, input_wscript);
}
assert(scriptPubkey);

View File

@@ -97,7 +97,7 @@ struct wally_tx_output *wally_tx_output(const tal_t *ctx,
/* Add one output to tx. */
int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script,
u8 *wscript,
const u8 *wscript,
struct amount_sat amount);
/* Set the locktime for a transaction */