mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
memleak: fix handling of notleak pointers.
We were ignoring the *parent* of the notleak pointers, not the notleak pointer itself! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fe86395e7c
commit
ea71e9fe5b
@ -271,11 +271,11 @@ static void call_memleak_helpers(struct htable *memtable, const tal_t *p)
|
||||
const struct memleak_helper *mh = i;
|
||||
mh->cb(memtable, p);
|
||||
} else if (name && strends(name, " **NOTLEAK**")) {
|
||||
pointer_referenced(memtable, p);
|
||||
memleak_remove_region(memtable, p, tal_bytelen(p));
|
||||
pointer_referenced(memtable, i);
|
||||
memleak_remove_region(memtable, i, tal_bytelen(i));
|
||||
} else if (name && strends(name, " **NOTLEAK_IGNORE_CHILDREN**")) {
|
||||
remove_with_children(memtable, p);
|
||||
memleak_remove_region(memtable, p, tal_bytelen(p));
|
||||
remove_with_children(memtable, i);
|
||||
memleak_remove_region(memtable, i, tal_bytelen(i));
|
||||
} else if (name && strends(name, "_notleak")) {
|
||||
pointer_referenced(memtable, i);
|
||||
call_memleak_helpers(memtable, i);
|
||||
|
Loading…
Reference in New Issue
Block a user