From 4defba825177157e45b46c390643667fec90c426 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 12 May 2022 19:41:22 +0900 Subject: [PATCH] [ui] Free the view's children array This would have leaked memory if views were being created and destroyed dynamically instead of just the once-off in the current code. --- libs/ui/view.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/ui/view.c b/libs/ui/view.c index ac0c4cbfc..3ffc70662 100644 --- a/libs/ui/view.c +++ b/libs/ui/view.c @@ -209,6 +209,7 @@ view_delete (view_t *view) view_remove (view->parent, view); while (view->num_children) view_delete (view->children[0]); + free (view->children); free (view); }