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:
parent
d51da61b2d
commit
dc245f389c
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user