Free db_state->info first in database_info_list_iterate_new

This commit is contained in:
twinaphex 2015-05-28 01:25:42 +02:00
parent 0e23908b78
commit 8bde46deb9

View File

@ -122,6 +122,8 @@ static int database_info_list_iterate_new(database_state_handle_t *db_state)
const char *new_database = db_state->list->elems[db_state->list_index].data;
RARCH_LOG("Check database [%d/%d] : %s\n", (unsigned)db_state->list_index,
(unsigned)db_state->list->size, new_database);
if (db_state->info)
database_info_list_free(db_state->info);
db_state->info = database_info_list_new(new_database, NULL);
return 0;
}