Commit dc245f38 authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

song: call freeJustSong if newSong fails

There's no reason to scan the playlist for a song we just allocated.
parent d51da61b
...@@ -70,7 +70,7 @@ Song *newSong(const char *url, enum song_type type, Directory * parentDir) ...@@ -70,7 +70,7 @@ Song *newSong(const char *url, enum song_type type, Directory * parentDir)
song->tag = plugin->tag_dup(abs_path); song->tag = plugin->tag_dup(abs_path);
} }
if (!song->tag || song->tag->time < 0) { if (!song->tag || song->tag->time < 0) {
freeSong(song); freeJustSong(song);
song = NULL; song = NULL;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment