memleak: fix handling of excluded pointers.

We often hand an exclude pointer (usually the current command) to
memleak.  But when we encountered this we would stop iterating, rather
than just ignore it: this means we would often ignore significant siblings.

In particular, fixing this (which has always been there) reveals many
previously-undetected leaks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-02-26 14:36:36 +10:30
parent ea71e9fe5b
commit dd495b2b21

View File

@ -79,7 +79,7 @@ static void children_into_htable(const void *exclude1, const void *exclude2,
const char *name = tal_name(i); const char *name = tal_name(i);
if (i == exclude1 || i == exclude2) if (i == exclude1 || i == exclude2)
return; continue;
if (name) { if (name) {
/* Don't add backtrace objects. */ /* Don't add backtrace objects. */