memleak,df: patchup memleak code for v2 channels

Takes 'unsaved' channels into account for memleak cleanups, instead of
solely relying on `uncommitted_channels`
This commit is contained in:
niftynei
2021-02-23 20:34:30 -06:00
committed by neil saitug
parent 6407ad334f
commit 474233f1b7
2 changed files with 22 additions and 6 deletions

View File

@@ -2446,7 +2446,11 @@ static void peer_memleak_req_next(struct command *cmd, struct channel *prev)
if (prev != NULL)
continue;
/* Note: closingd does its own checking automatically */
/* Note: closingd and dualopend do their own
* checking automatically */
if (channel_unsaved(c))
continue;
if (streq(c->owner->name, "channeld")) {
subd_req(c, c->owner,
take(towire_channeld_dev_memleak(NULL)),