aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-05 16:39:39 -0700
committerEric Wong <normalperson@yhbt.net>2008-10-05 16:39:39 -0700
commitd19a44a5f80dd4b02ab03b8639358f83927076a9 (patch)
tree040b7930de01dc8e790d9407efdda8cabc535985
parent5df85b429b19281200d25aa102885702f0fddfb6 (diff)
downloadmpd-d19a44a5f80dd4b02ab03b8639358f83927076a9.tar.gz
mpd-d19a44a5f80dd4b02ab03b8639358f83927076a9.tar.xz
mpd-d19a44a5f80dd4b02ab03b8639358f83927076a9.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 4f7b2f8bb..d1a35afb3 100644
--- a/src/song.c
+++ b/src/song.c
@@ -71,7 +71,7 @@ Song *newSong(const char *url, int type, Directory * parentDir)
song->tag = plugin->tagDupFunc(abs_path);
}
if (!song->tag || song->tag->time < 0) {
- freeSong(song);
+ freeJustSong(song);
song = NULL;
}
}