Sigh, another memory leak

git-svn-id: https://svn.musicpd.org/mpd/trunk@4374 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2006-07-16 19:40:09 +00:00
parent fefd214b8e
commit 25c37e9276
1 changed files with 7 additions and 2 deletions

View File

@ -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);