Skip to content

Commit

Permalink
memleak: fix handling of excluded pointers.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rustyrussell committed Feb 25, 2022
1 parent 59771a3 commit 6109132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/memleak.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 6109132

Please sign in to comment.