Fix 2 memory leaks in explore view

Free cached playlist that could have been loaded before entering explore view
Free temporary hashmap used to filter sub-categories
This commit is contained in:
Bernhard Schelling 2020-07-28 21:06:20 +09:00 committed by GitHub
parent 89567dae5d
commit 77a7e7eecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -901,6 +901,12 @@ unsigned menu_displaylist_explore(file_list_t *list)
" '%s'", explore_state->find_string);
}
if (current_type == MENU_EXPLORE_TAB)
{
// free any existing playlist when entering the explore view
playlist_free_cached();
}
playlist_set_cached(NULL);
if ( current_type == MENU_EXPLORE_TAB
@ -1112,6 +1118,8 @@ SKIP_ENTRY:;
explore_append_title(explore_state,
" (%u)", (unsigned) (list->size - 1));
ex_hashmap32_free(&map_filtered_category);
}
else
{