Commit 25c37e92 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Sigh, another memory leak

git-svn-id: https://svn.musicpd.org/mpd/trunk@4374 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent fefd214b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment