From 8fc2bc142211188344ebd73943133b9cb17d4431 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 29 Feb 2020 20:04:29 +0100 Subject: 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. --- ta/ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ta') 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; } -- cgit v1.2.3