aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/path.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index db41ed968..8f4cb6911 100644
--- a/src/path.c
+++ b/src/path.c
@@ -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 */