Merge pull request #11091 from schellingb/explore_fix_leaks

Fix 2 memory leaks in explore view
This commit is contained in:
Autechre 2020-07-28 14:32:20 +02:00 committed by GitHub
commit 89bc5d9c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

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
{