song: allocate the result of song_get_url()

This commit is contained in:
Max Kellermann
2009-01-04 19:09:34 +01:00
parent ea8ae68e6f
commit fed719197c
13 changed files with 110 additions and 85 deletions

View File

@@ -208,11 +208,8 @@ static void decoder_run(void)
if (song_is_file(song))
uri = map_song_fs(song);
else {
char buffer[MPD_PATH_MAX];
uri = g_strdup(song_get_url(song, buffer));
}
else
uri = song_get_uri(song);
if (uri == NULL) {
dc.state = DECODE_STATE_ERROR;