mirror of https://github.com/mpv-player/mpv
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:
parent
84fe9c2a47
commit
8fc2bc1422
2
ta/ta.c
2
ta/ta.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue