(playlist) Set conf_path and entries to NULL on free

This commit is contained in:
Higor Eurípedes 2015-06-09 17:06:20 -03:00
parent c1c4f4128b
commit aa80b352ee

View File

@ -272,9 +272,13 @@ void content_playlist_free(content_playlist_t *playlist)
if (playlist->conf_path)
free(playlist->conf_path);
playlist->conf_path = NULL;
for (i = 0; i < playlist->cap; i++)
content_playlist_free_entry(&playlist->entries[i]);
free(playlist->entries);
playlist->entries = NULL;
free(playlist);
}