aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-16 19:40:09 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-16 19:40:09 +0000
commit25c37e9276f77c1c3d975c2186d90abb7be20c3a (patch)
treed659d8de949a67170c9e1f4816cff318bb7469c2 /src
parentfefd214b8e06d04f060d2db680dfba9aa359568b (diff)
downloadmpd-25c37e9276f77c1c3d975c2186d90abb7be20c3a.tar.gz
mpd-25c37e9276f77c1c3d975c2186d90abb7be20c3a.tar.xz
mpd-25c37e9276f77c1c3d975c2186d90abb7be20c3a.zip
Sigh, another memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4374 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-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);