From 3ee3e5a1a5a0e07a1d6b617c915077dd6d020533 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 31 Dec 2014 20:07:42 +0100 Subject: [PATCH] menu_list_destroy - check if 'list' is non-NULL before calling file_list_free --- menu/menu_list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/menu_list.c b/menu/menu_list.c index 8012b04e76..0a00bfc452 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -35,7 +35,8 @@ void menu_list_destroy(file_list_t *list) } end: - file_list_free(list); + if (list) + file_list_free(list); } void menu_list_free(menu_list_t *menu_list)