Browse Source

memleak: fix exclude check.

We want to exclude the child from being entered into the htable:
if we wanted the parent we could do this outside the loop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
37ea0d3c7f
  1. 4
      common/memleak.c

4
common/memleak.c

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

Loading…
Cancel
Save