mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user