From 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 15 Oct 2022 09:08:09 -0400 Subject: move buflib_free invalid handle check to the function allow buflib_free to check for invalid or already freed handles within the function -- remove all the invalid handle guards thru core_free Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e --- apps/debug_menu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index b034f25df0..d17668ade5 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -520,8 +520,7 @@ static int bf_action_cb(int action, struct gui_synclist* list) /* for some reason simplelist doesn't allow adding items here if * info.get_name is given, so use normal list api */ gui_synclist_set_nb_items(list, core_get_num_blocks()); - if (handle > 0) - core_free(handle); + core_free(handle); } action = ACTION_REDRAW; } -- cgit v1.2.3