Skip to content

Commit

Permalink
peer_htlcs.c: close taken() leak.
Browse files Browse the repository at this point in the history
Found in tests/test_connection.py::test_restart_many_payments:

`lightningd: outstanding taken(): lightningd/peer_htlcs.c:532:towire_temporary_channel_failure(((void *)0), ((void *)0))`

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and cdecker committed Dec 3, 2020
1 parent e4950db commit dc745cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lightningd/peer_htlcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ static void fail_out_htlc(struct htlc_out *hout,
hout->failmsg);
fail_in_htlc(hout->in, failonion);
}
} else {
if (taken(failmsg_needs_update))
tal_free(failmsg_needs_update);
}
}

Expand Down

0 comments on commit dc745cd

Please sign in to comment.