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:
@@ -261,11 +261,16 @@ static void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl *
|
||||
InputStream inStream;
|
||||
InputPlugin * plugin = NULL;
|
||||
char * path;
|
||||
char * relativePath;
|
||||
|
||||
if(isRemoteUrl(pc->utf8url)) {
|
||||
path = utf8StrToLatin1Dup(pc->utf8url);
|
||||
}
|
||||
else path = strdup(rmp2amp(utf8ToFsCharset(pc->utf8url)));
|
||||
else {
|
||||
relativePath = utf8ToFsCharset(pc->utf8url);
|
||||
path = strdup(rmp2amp(relativePath));
|
||||
free(relativePath);
|
||||
}
|
||||
|
||||
if(!path) {
|
||||
dc->error = DECODE_ERROR_FILE;
|
||||
|
||||
Reference in New Issue
Block a user