mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
memleak: prepare for htable to be a tal object.
Since it gets resized during traverse, we would crash by keeping a pointer to the old one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
81e57dce52
commit
851cbf6c83
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ static void children_into_htable(struct htable *memtable, const tal_t *p)
|
|||
if (streq(name, "tmpctx"))
|
||||
continue;
|
||||
}
|
||||
/* Don't add (resizing!) memtable table! */
|
||||
if (i == memtable->table)
|
||||
continue;
|
||||
|
||||
htable_add(memtable, hash_ptr(i, NULL), i);
|
||||
children_into_htable(memtable, i);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue