Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-06-08 19:25:09 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-06-08 19:25:09 +0400
commitb7d3e6d7d23d74a3b99e3a55a8d982d382f3930f (patch)
treed592de693a1903aee2599d5ab480e6a305c5d869 /winsup
parent68ff495c609754a12ab208c942ef76d031437210 (diff)
* path.cc (symlink_info::check): Set h to NULL after closing handle
in udf check. Remove overagressive bracketing. Don't set h to NULL without closing the handle. Fix using wrong handle in checking file system when using parent directory handle.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/path.cc6
2 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 01770a7dd..9e71ea4f8 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check): Set h to NULL after closing handle
+ in udf check. Remove overagressive bracketing. Don't set h to NULL
+ without closing the handle. Fix using wrong handle in checking
+ file system when using parent directory handle.
+
2010-06-07 Corinna Vinschen <corinna@vinschen.de>
* include/sys/stdio.h: Remove _GNU_SOURCE guard around getline
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 8ebd7cce9..4173401e3 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2308,6 +2308,7 @@ restart:
if (!fs.is_udf ())
{
NtClose (h);
+ h = NULL;
status = STATUS_OBJECT_NAME_NOT_FOUND;
}
}
@@ -2355,7 +2356,7 @@ restart:
if (NT_SUCCESS (status)
/* Check file system while we're having the file open anyway.
This speeds up path_conv noticably (~10%). */
- && (fs.inited () || (fs.update (&upath, h)))
+ && (fs.inited () || fs.update (&upath, h))
&& NT_SUCCESS (status = fs.has_buggy_basic_info ()
? NtQueryAttributesFile (&attr, &fbi)
: NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
@@ -2364,7 +2365,6 @@ restart:
else
{
debug_printf ("%p = NtQueryInformationFile (%S)", status, &upath);
- h = NULL;
fileattr = INVALID_FILE_ATTRIBUTES;
/* One of the inner path components is invalid, or the path contains
@@ -2427,7 +2427,7 @@ restart:
TRUE, &basename, TRUE);
/* Take the opportunity to check file system while we're
having the handle to the parent dir. */
- fs.update (&upath, h);
+ fs.update (&upath, dir);
NtClose (dir);
if (!NT_SUCCESS (status))
{