channeld: fix memleak where tx gets leaked.
We steal it onto "peer" where we should steal it onto the inflight: ``` label=struct bitcoin_tx backtrace: ccan/ccan/tal/tal.c:477 (tal_alloc_) bitcoin/tx.c:612 (clone_bitcoin_tx) channeld/channeld.c:2163 (handle_peer_commit_sig) channeld/channeld.c:2191 (handle_peer_commit_sig) channeld/channeld.c:2831 (interactive_send_commitments) channeld/channeld.c:3814 (splice_initiator_user_finalized) channeld/channeld.c:3882 (splice_initiator_user_update) channeld/channeld.c:5651 (req_in) channeld/channeld.c:6044 (main) ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) ../csu/libc-start.c:360 (__libc_start_main_impl) parents: struct peer ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e21bcbfbb9
commit
11df13e779
|
@ -3814,7 +3814,7 @@ static void splice_initiator_user_finalized(struct peer *peer)
|
|||
their_commit = interactive_send_commitments(peer, ictx->current_psbt,
|
||||
TX_INITIATOR);
|
||||
|
||||
new_inflight->last_tx = tal_steal(peer, their_commit->tx);
|
||||
new_inflight->last_tx = tal_steal(new_inflight, their_commit->tx);
|
||||
new_inflight->last_sig = their_commit->commit_signature;
|
||||
|
||||
outmsg = towire_channeld_update_inflight(NULL, ictx->current_psbt,
|
||||
|
|
Loading…
Reference in New Issue