From 901ce8f8d4cad41120dd603f3f431ae1cf9405aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Sat, 13 Jun 2015 14:37:58 -0300 Subject: [PATCH] (XMB) Fix xmb->menu_stack_old leak --- menu/drivers/xmb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 68d5133531..bc5a46e8a7 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1583,8 +1583,15 @@ static void xmb_free(void *data) return; if (xmb->menu_stack_old) + { + /* list nodes are owned by menu->menu_list->menu_stack */ + if (xmb->menu_stack_old->list) + free(xmb->menu_stack_old->list); + free(xmb->menu_stack_old); + } xmb->menu_stack_old = NULL; + if (xmb->selection_buf_old) file_list_free(xmb->selection_buf_old); xmb->selection_buf_old = NULL;