plug a potential memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@713 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
20be66a944
commit
4920ee719a
@ -55,7 +55,10 @@ char * fsCharsetToUtf8(char * str) {
|
||||
|
||||
ret = pathConvCharset("UTF-8",fsCharset,str,ret);
|
||||
|
||||
if(ret && !validUtf8String(ret)) ret = NULL;
|
||||
if(ret && !validUtf8String(ret)) {
|
||||
free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
/*if(!ret) ret = asciiStrToUtf8Dup(str);*/
|
||||
|
||||
/* if all else fails, just strdup */
|
||||
|
Loading…
Reference in New Issue
Block a user