mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 06:55:13 +01:00
wallet: fix memleak if we get shut down before finishing utxo cleanup.
"backtrace": [ "ccan/ccan/tal/tal.c:442 (tal_alloc_)", "wallet/wallet.c:154 (wallet_stmt2output)", "wallet/wallet.c:275 (wallet_get_utxos)", "wallet/wallet.c:3792 (wallet_clean_utxos)", "lightningd/lightningd.c:914 (main)" ], "label": "wallet/wallet.c:154:struct utxo", "parents": [ "wallet/wallet.c:273:struct utxo*[]" ], "value": "0x24c1be8" Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d14460ef3d
commit
ae0cccb293
1 changed files with 2 additions and 1 deletions
|
@ -3768,7 +3768,8 @@ void wallet_clean_utxos(struct wallet *w, struct bitcoind *bitcoind)
|
|||
|
||||
if (tal_count(utxos) != 0) {
|
||||
bitcoind_getutxout(bitcoind, &utxos[0]->txid, utxos[0]->outnum,
|
||||
process_utxo_result, notleak(utxos));
|
||||
process_utxo_result,
|
||||
notleak_with_children(utxos));
|
||||
} else
|
||||
tal_free(utxos);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue