mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
common: Fix a memleak in withdraw_tx
This commit is contained in:
parent
b660531216
commit
0ab3817715
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <bitcoin/script.h>
|
#include <bitcoin/script.h>
|
||||||
#include <ccan/ptrint/ptrint.h>
|
#include <ccan/ptrint/ptrint.h>
|
||||||
#include <common/permute_tx.h>
|
#include <common/permute_tx.h>
|
||||||
|
#include <common/utils.h>
|
||||||
#include <common/utxo.h>
|
#include <common/utxo.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wally_bip32.h>
|
#include <wally_bip32.h>
|
||||||
|
@ -29,7 +30,7 @@ struct bitcoin_tx *withdraw_tx(const tal_t *ctx,
|
||||||
const void *map[2];
|
const void *map[2];
|
||||||
map[0] = int2ptr(0);
|
map[0] = int2ptr(0);
|
||||||
map[1] = int2ptr(1);
|
map[1] = int2ptr(1);
|
||||||
bitcoin_tx_add_output(tx, scriptpubkey_p2wpkh(tx, changekey),
|
bitcoin_tx_add_output(tx, scriptpubkey_p2wpkh(tmpctx, changekey),
|
||||||
change);
|
change);
|
||||||
permute_outputs(tx, NULL, map);
|
permute_outputs(tx, NULL, map);
|
||||||
if (change_outnum)
|
if (change_outnum)
|
||||||
|
|
Loading…
Add table
Reference in a new issue