Fixing a whopping 4 memory leaks

git-svn-id: https://svn.musicpd.org/mpd/trunk@4371 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman
2006-07-16 18:22:03 +00:00
parent 8d630f30e8
commit 5d1df8e25c
3 changed files with 9 additions and 4 deletions

View File

@@ -1310,7 +1310,7 @@ int savePlaylist(FILE * fp, char * utf8file) {
return -1;
}
file = strdup(utf8ToFsCharset(utf8file));
file = utf8ToFsCharset(utf8file);
rfile = malloc(strlen(file)+strlen(".")+
strlen(PLAYLIST_FILE_SUFFIX)+1);
@@ -1415,7 +1415,7 @@ static int PlaylistIterFunc(FILE * fp, char * utf8file, void (*IterFunc)(FILE *f
FILE * fileP;
char s[MAXPATHLEN+1];
int slength = 0;
char * temp = strdup(utf8ToFsCharset(utf8file));
char * temp = utf8ToFsCharset(utf8file);
char * rfile = malloc(strlen(temp)+strlen(".")+
strlen(PLAYLIST_FILE_SUFFIX)+1);
char * actualFile;