Revert "playlist: Fix memory leak due to unallocated playlist entry strings"

This reverts commit 0adee8b775.
This commit is contained in:
twinaphex 2016-06-17 14:24:35 +02:00
parent eee57a77ad
commit 96073cf057

View File

@ -182,31 +182,13 @@ void playlist_update(playlist_t *playlist, size_t idx,
return;
entry = &playlist->entries[idx];
if (path) {
free(entry->path);
entry->path = strdup(path);
}
if (label) {
free(entry->label);
entry->label = strdup(label);
}
if (core_path) {
free(entry->core_path);
entry->core_path = strdup(core_path);
}
if (core_name) {
free(entry->core_name);
entry->core_name = strdup(core_name);
}
if (db_name) {
free(entry->db_name);
entry->db_name = strdup(db_name);
}
if (crc32) {
free(entry->crc32);
entry->crc32 = strdup(crc32);
}
entry->path = path ? strdup(path) : entry->path;
entry->label = label ? strdup(label) : entry->label;
entry->core_path = core_path ? strdup(core_path) : entry->core_path;
entry->core_name = core_name ? strdup(core_name) : entry->core_name;
entry->db_name = db_name ? strdup(db_name) : entry->db_name;
entry->crc32 = crc32 ? strdup(crc32) : entry->crc32;
}
/**