From 39615044e37ce1670415fc7af540105c9f6a214b Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sun, 16 Jul 2006 19:55:01 +0000 Subject: Will the leaks never end?! git-svn-id: https://svn.musicpd.org/mpd/trunk@4375 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/ls.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ls.c b/src/ls.c index fcc4b7d0f..b93dbf13e 100644 --- a/src/ls.c +++ b/src/ls.c @@ -181,10 +181,15 @@ int lsPlaylists(FILE * fp, char * utf8path) { int myStat(char * utf8file, struct stat * st) { char * file = utf8ToFsCharset(utf8file); char * actualFile = file; + int ret; if(actualFile[0]!='/') actualFile = rmp2amp(file); - return stat(actualFile,st); + ret = stat(actualFile,st); + + free(file); + + return ret; } static int isFile(char * utf8file, time_t * mtime) { -- cgit v1.2.3