aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_save.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlist_save.c')
-rw-r--r--src/playlist_save.c6
1 files changed, 4 insertions, 2 deletions
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);