From 8bde46deb951e24a28df7b5ae4e0a5b38ebba4dc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 28 May 2015 01:25:42 +0200 Subject: [PATCH] Free db_state->info first in database_info_list_iterate_new --- tasks/task_database.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/task_database.c b/tasks/task_database.c index d8255a135b..47bb13a5cc 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -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; }