peer_htlcs.c: close taken() leak.

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>
This commit is contained in:
Rusty Russell 2020-12-03 11:55:21 +10:30 committed by Christian Decker
parent e4950db9a3
commit dc745cdf2f

View file

@ -324,6 +324,9 @@ static void fail_out_htlc(struct htlc_out *hout,
hout->failmsg); hout->failmsg);
fail_in_htlc(hout->in, failonion); fail_in_htlc(hout->in, failonion);
} }
} else {
if (taken(failmsg_needs_update))
tal_free(failmsg_needs_update);
} }
} }