From daf7c3db5aac09a8376f1c8ed499eb17202f77a9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 2 Jan 2009 10:48:55 +0100 Subject: mapper: allocate the result of map_directory_child_fs(), map_song_fs() Don't use fixed stack buffers. --- src/playlist_save.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/playlist_save.c') diff --git a/src/playlist_save.c b/src/playlist_save.c index b6bc99369..4c9d0b2f4 100644 --- a/src/playlist_save.c +++ b/src/playlist_save.c @@ -32,9 +32,11 @@ playlist_print_song(FILE *file, const struct song *song) char tmp1[MPD_PATH_MAX], tmp2[MPD_PATH_MAX]; if (playlist_saveAbsolutePaths && song_in_database(song)) { - const char *path = map_song_fs(song, tmp1); - if (path != NULL) + char *path = map_song_fs(song); + if (path != NULL) { fprintf(file, "%s\n", path); + g_free(path); + } } else { song_get_url(song, tmp1); utf8_to_fs_charset(tmp2, tmp1); -- cgit v1.2.3