From dd495b2b21dbf8d1511a2735568ed4be61251542 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 26 Feb 2022 14:36:36 +1030 Subject: [PATCH] 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 --- common/memleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/memleak.c b/common/memleak.c index 0c698e747..68fe64f74 100644 --- a/common/memleak.c +++ b/common/memleak.c @@ -79,7 +79,7 @@ static void children_into_htable(const void *exclude1, const void *exclude2, const char *name = tal_name(i); if (i == exclude1 || i == exclude2) - return; + continue; if (name) { /* Don't add backtrace objects. */