aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-06 18:41:41 +0200
committerMax Kellermann <max@duempel.org>2008-10-06 18:41:41 +0200
commitdc245f389cffb1cb50d7dc066827be702b424a01 (patch)
tree3cab8b53d1280a2ddf8baef3fd9ca4e93414b5b6
parentd51da61b2d34a6c60caf6ce20022477dacade3f9 (diff)
downloadmpd-dc245f389cffb1cb50d7dc066827be702b424a01.tar.gz
mpd-dc245f389cffb1cb50d7dc066827be702b424a01.tar.xz
mpd-dc245f389cffb1cb50d7dc066827be702b424a01.zip
song: call freeJustSong if newSong fails
There's no reason to scan the playlist for a song we just allocated.
-rw-r--r--src/song.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/song.c b/src/song.c
index 0bdf40c02..9436df97c 100644
--- a/src/song.c
+++ b/src/song.c
@@ -70,7 +70,7 @@ Song *newSong(const char *url, enum song_type type, Directory * parentDir)
song->tag = plugin->tag_dup(abs_path);
}
if (!song->tag || song->tag->time < 0) {
- freeSong(song);
+ freeJustSong(song);
song = NULL;
}
}