diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-04-13 05:19:45 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-04-13 05:19:45 +0000 |
commit | 4920ee719a2490b7d661d4373640e8665f696976 (patch) | |
tree | e4086b1ee3680ce282b149e95e51a306f49e3fb5 /src | |
parent | 20be66a944fb6bae9f30f474ea2e87784f44148c (diff) | |
download | mpd-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.c | 5 |
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 */ |