aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-04-13 05:19:45 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-04-13 05:19:45 +0000
commit4920ee719a2490b7d661d4373640e8665f696976 (patch)
treee4086b1ee3680ce282b149e95e51a306f49e3fb5 /src
parent20be66a944fb6bae9f30f474ea2e87784f44148c (diff)
downloadmpd-4920ee719a2490b7d661d4373640e8665f696976.tar.gz
mpd-4920ee719a2490b7d661d4373640e8665f696976.tar.xz
mpd-4920ee719a2490b7d661d4373640e8665f696976.zip
plug a potential memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@713 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-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 */