mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 10:49:02 +00:00
Fix menu_driver_list_insert leaks
This commit is contained in:
parent
b8d2cad194
commit
b304ddcf7a
@ -541,7 +541,9 @@ static int action_iterate_main(const char *label, unsigned action)
|
||||
do_pop_stack = true;
|
||||
break;
|
||||
case ITERATE_TYPE_DEFAULT:
|
||||
selected = menu_navigation_get_current_selection();
|
||||
selected = menu_navigation_get_current_selection();
|
||||
selected = max(min(selected, menu_list_get_size(menu_list)-1), 0);
|
||||
|
||||
menu_entry_get(&entry, selected, NULL, false);
|
||||
ret = menu_entry_action(&entry, selected, (enum menu_action)action);
|
||||
|
||||
|
@ -197,9 +197,13 @@ void menu_driver_list_free(file_list_t *list, size_t idx, size_t list_size)
|
||||
void menu_driver_list_clear(file_list_t *list)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
unsigned i;
|
||||
|
||||
if (driver->list_clear)
|
||||
driver->list_clear(list);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
file_list_free_actiondata(list, i);
|
||||
}
|
||||
|
||||
void menu_driver_context_destroy(void)
|
||||
|
Loading…
Reference in New Issue
Block a user