lightningd: fix parent reporting for memleaks.

This was confusing!  We reported every second one.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-04-10 09:47:56 +09:30
parent 89b96e8ac0
commit 34f25db435

View File

@@ -174,10 +174,8 @@ static void finish_report(const struct leak_detect *leaks)
json_add_backtrace(response, backtrace);
json_array_start(response, "parents");
for (p = tal_parent(i); p; p = tal_parent(p)) {
for (p = tal_parent(i); p; p = tal_parent(p))
json_add_string(response, NULL, tal_name(p));
p = tal_parent(p);
}
json_array_end(response);
json_object_end(response);
}