From c46727604e4068851100cc4ee0749eb956d824c2 Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Mon, 29 Jan 2018 18:54:08 +0000 Subject: [PATCH] peer_htlcs: Prevent htlc_out from being handled multiple times in case of immediate channeld error. --- lightningd/peer_htlcs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 70f46731d..f295937bc 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -349,6 +349,8 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds, } else local_fail_htlc(hout->in, failure_code, hout->key.peer->scid); + /* Prevent hout from being failed twice. */ + tal_del_destructor(hout, hout_subd_died); tal_free(hout); return; }