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;