summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-10-15 09:08:09 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2022-10-15 09:26:58 -0400
commit12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 (patch)
treeb4885951a5cba1b78c21b30ce37a1d6f1574aa5f /apps/debug_menu.c
parent9d3d925295112a0080bc1d70fad170db9e1af2a9 (diff)
downloadrockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.tar.gz
rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.zip
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
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c3
1 files changed, 1 insertions, 2 deletions
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)
520 /* for some reason simplelist doesn't allow adding items here if 520 /* for some reason simplelist doesn't allow adding items here if
521 * info.get_name is given, so use normal list api */ 521 * info.get_name is given, so use normal list api */
522 gui_synclist_set_nb_items(list, core_get_num_blocks()); 522 gui_synclist_set_nb_items(list, core_get_num_blocks());
523 if (handle > 0) 523 core_free(handle);
524 core_free(handle);
525 } 524 }
526 action = ACTION_REDRAW; 525 action = ACTION_REDRAW;
527 } 526 }