* syscalls.cc (pathconf): Fix memory leak.

This commit is contained in:
Corinna Vinschen 2009-03-27 11:29:56 +00:00
parent d6e045e614
commit 7a9f309bcd
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (pathconf): Fix memory leak.
2009-03-26 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_worker): Write target filename as UTF-16 string

View File

@ -2047,10 +2047,12 @@ extern "C" long int
pathconf (const char *file, int v)
{
fhandler_base *fh;
long ret = -1;
myfault efault;
if (efault.faulted (EFAULT))
return -1;
if (!*file)
{
set_errno (ENOENT);
@ -2059,11 +2061,11 @@ pathconf (const char *file, int v)
if (!(fh = build_fh_name (file, NULL, PC_SYM_FOLLOW, stat_suffixes)))
return -1;
if (!fh->exists ())
{
set_errno (ENOENT);
return -1;
}
return fh->fpathconf (v);
set_errno (ENOENT);
else
ret = fh->fpathconf (v);
delete fh;
return ret;
}
extern "C" int