OSDN Git Service

* path.cc (path_conv::check): Close handle in conv_handle if we're
authorcorinna <corinna>
Fri, 20 Aug 2010 14:29:55 +0000 (14:29 +0000)
committercorinna <corinna>
Fri, 20 Aug 2010 14:29:55 +0000 (14:29 +0000)
following a symlink.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 7ec9799..5053b4e 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-20  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (path_conv::check): Close handle in conv_handle if we're
+       following a symlink.
+
 2010-08-20  Pedro Izecksohn <pedro.izecksohn@gmail.com>
 
        * endian.h (htobe16, htobe32, htobe64, be16toh, be32toh, be64toh,
index fb4526f..deefc77 100644 (file)
@@ -900,6 +900,9 @@ is_virtual_symlink:
              /* Following a symlink we can't trust the collected filesystem
                 information any longer. */
              fs.clear ();
+             /* Close handle, if we have any.  Otherwise we're collecting
+                handles while following symlinks. */
+             conv_handle.close ();
              break;
            }
          else if (sym.error && sym.error != ENOENT)