* fhandler_disk_file.cc (utimens_fs): Plug fd leak on EINVAL.

This commit is contained in:
Eric Blake 2009-10-08 11:13:45 +00:00
parent 8bd7bd3bc0
commit 80636211bc
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-10-08 Eric Blake <ebb9@byu.net>
* fhandler_disk_file.cc (utimens_fs): Plug fd leak on EINVAL.
2009-10-07 Charles Wilson <cygwin@cwilson.fastmail.fm>
Additional pseudo-reloc-v2 support

View File

@ -1310,6 +1310,8 @@ fhandler_base::utimens_fs (const struct timespec *tvp)
if ((tvp[0].tv_nsec < UTIME_NOW || tvp[0].tv_nsec > 999999999L)
|| (tvp[1].tv_nsec < UTIME_NOW || tvp[1].tv_nsec > 999999999L))
{
if (closeit)
close_fs ();
set_errno (EINVAL);
return -1;
}