aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
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 /winsup/cygwin/path.cc
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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc3
1 files changed, 1 insertions, 2 deletions
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