From bd5c0effa423696973e4082071ac58cf07155d52 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 26 May 2016 22:17:33 +0200 Subject: [PATCH] Revert "playlist_free_entry - cleanups" This reverts commit 96244064383e41867db62043912ee4fb36ac19d5. --- playlist.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/playlist.c b/playlist.c index d48c3faa2d..25d90b4872 100644 --- a/playlist.c +++ b/playlist.c @@ -143,28 +143,29 @@ static void playlist_free_entry(playlist_entry_t *entry) if (entry->path) free(entry->path); + entry->path = NULL; if (entry->label) free(entry->label); + entry->label = NULL; if (entry->core_path) free(entry->core_path); + entry->core_path = NULL; if (entry->core_name) free(entry->core_name); + entry->core_name = NULL; if (entry->db_name) free(entry->db_name); + entry->core_name = NULL; if (entry->crc32) free(entry->crc32); + entry->crc32 = NULL; - entry->path = NULL; - entry->label = NULL; - entry->core_path = NULL; - entry->core_name = NULL; - entry->db_name = NULL; - entry->crc32 = NULL; + memset(entry, 0, sizeof(*entry)); } void playlist_update(playlist_t *playlist, size_t idx,