lightningd: free peer->uc when openingd fails.

This avoids reuse which can cause confusion; the long-term fix is to
rewrite this to use real channels like dualfunding does.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-03-23 09:31:36 +10:30
parent bcf3cef96c
commit 9c978f2c63

View file

@ -574,6 +574,8 @@ static void openingd_failed(struct subd *openingd, const u8 *msg,
/* Noop if we're not funder. */
opening_funder_failed_cancel_commands(uc, desc);
/* Detaches from ->peer */
tal_free(uc);
}
struct openchannel_hook_payload {