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:
Warren Dukes 2004-04-13 05:19:45 +00:00
parent 20be66a944
commit 4920ee719a

View File

@ -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 */