aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-16 19:55:01 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-16 19:55:01 +0000
commit39615044e37ce1670415fc7af540105c9f6a214b (patch)
tree3c5143af72c442255528573de93b372efebc16a0 /src/ls.c
parent25c37e9276f77c1c3d975c2186d90abb7be20c3a (diff)
downloadmpd-39615044e37ce1670415fc7af540105c9f6a214b.tar.gz
mpd-39615044e37ce1670415fc7af540105c9f6a214b.tar.xz
mpd-39615044e37ce1670415fc7af540105c9f6a214b.zip
Will the leaks never end?!
git-svn-id: https://svn.musicpd.org/mpd/trunk@4375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c7
1 files changed, 6 insertions, 1 deletions
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) {