ta: fix logging of unfreed child allocations

Broken since commit f6615f00ee. This traversed the data
structure incorrectly, and caused a stack overflow due to infinite
recursion.
This commit is contained in:
wm4 2020-02-29 20:04:29 +01:00
parent 84fe9c2a47
commit 8fc2bc1422
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ static void ta_dbg_remove(struct ta_header *h)
static size_t get_children_size(struct ta_header *h)
{
size_t size = 0;
for (struct ta_header *s = h; s; s = s->next)
for (struct ta_header *s = h->child; s; s = s->next)
size += s->size + get_children_size(s);
return size;
}