song: call freeJustSong if newSong fails

There's no reason to scan the playlist for a song we
just allocated.
This commit is contained in:
Eric Wong 2008-10-06 18:41:41 +02:00 committed by Max Kellermann
parent d51da61b2d
commit dc245f389c

View File

@ -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;
} }
} }