aboutsummaryrefslogtreecommitdiff
path: root/src/stored_playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:09:34 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 19:09:34 +0100
commitfed719197c7014151710c4aae9174990fd131d59 (patch)
tree0fb6d6f69aa60ecdf9eb89286f8354316fffcc92 /src/stored_playlist.c
parentea8ae68e6f1a686fd96530fdaf7b428e33f58ec4 (diff)
song: allocate the result of song_get_url()
Diffstat (limited to 'src/stored_playlist.c')
-rw-r--r--src/stored_playlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stored_playlist.c b/src/stored_playlist.c
index fd2f6fc0..3504c0a2 100644
--- a/src/stored_playlist.c
+++ b/src/stored_playlist.c
@@ -141,7 +141,6 @@ spl_load(const char *utf8path)
FILE *file;
GPtrArray *list;
char buffer[MPD_PATH_MAX];
- char path_max_tmp[MPD_PATH_MAX];
char *path_fs;
if (!is_valid_playlist_name(utf8path))
@@ -177,10 +176,11 @@ spl_load(const char *utf8path)
if (song == NULL)
continue;
- s = song_get_url(song, path_max_tmp);
- }
+ s = song_get_uri(song);
+ } else
+ s = g_strdup(s);
- g_ptr_array_add(list, g_strdup(s));
+ g_ptr_array_add(list, s);
if (list->len >= playlist_max_length)
break;