aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2008-12-24 16:34:38 +0000
committerChristopher Faylor <me@cgf.cx>2008-12-24 16:34:38 +0000
commit58402a3f63a23a8706c5dc58305c06b3df228170 (patch)
tree110de6b5288c44c911d1dbd282465c9a7c0c5f28
parent2f6f0bbeaebc3f7f72c14076d4dd59ecf23ad3b2 (diff)
downloadnewlib-58402a3f63a23a8706c5dc58305c06b3df228170.zip
newlib-58402a3f63a23a8706c5dc58305c06b3df228170.tar.gz
newlib-58402a3f63a23a8706c5dc58305c06b3df228170.tar.bz2
* path.cc (symlink_info::check_shortcut): Ensure that symlink handle is closed
on successful return.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc3
2 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8068c07..5a6a8c2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-24 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * path.cc (symlink_info::check_shortcut): Ensure that symlink handle is
+ closed on successful return.
+
2008-12-23 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.h (fhandler_base_setup_overlapped): Add new argument.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3b726c0..5cacaba 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1902,11 +1902,10 @@ symlink_info::check_shortcut (HANDLE in_h)
}
if (res) /* It's a symlink. */
pflags = PATH_SYMLINK | PATH_LNK;
- return res;
out:
NtClose (h);
- return 0;
+ return res;
}
int