summaryrefslogtreecommitdiffstats
path: root/ta
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-29 20:04:29 +0100
committerwm4 <wm4@nowhere>2020-02-29 20:12:31 +0100
commit8fc2bc142211188344ebd73943133b9cb17d4431 (patch)
treeed1355c8c75cdcf111602364be44e41860c02ac3 /ta
parent84fe9c2a474e58a69c1b11e6de92107c78598604 (diff)
downloadmpv-8fc2bc142211188344ebd73943133b9cb17d4431.tar.bz2
mpv-8fc2bc142211188344ebd73943133b9cb17d4431.tar.xz
ta: fix logging of unfreed child allocations
Broken since commit f6615f00eeb05f072a. This traversed the data structure incorrectly, and caused a stack overflow due to infinite recursion.
Diffstat (limited to 'ta')
-rw-r--r--ta/ta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ta/ta.c b/ta/ta.c
index 7b6a6c7f91..275c8025b1 100644
--- a/ta/ta.c
+++ b/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;
}