aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/playlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 80e9ca185..395688aeb 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1302,6 +1302,7 @@ int savePlaylist(FILE * fp, char * utf8file) {
char * file;
char * rfile;
char * actualFile;
+ char * url;
if(strstr(utf8file,"/")) {
commandError(fp, ACK_ERROR_ARG,
@@ -1345,8 +1346,12 @@ int savePlaylist(FILE * fp, char * utf8file) {
myfprintf(fileP,"%s\n",rmp2amp(utf8ToFsCharset((
getSongUrl(playlist.songs[i])))));
}
- else myfprintf(fileP,"%s\n",
- utf8ToFsCharset(getSongUrl(playlist.songs[i])));
+ else {
+ url = utf8ToFsCharset(getSongUrl(playlist.songs[i]));
+ myfprintf(fileP, "%s\n", url);
+ free(url);
+
+ }
}
while(fclose(fileP) && errno==EINTR);