com php-src: Fixed bug #62444 (Handle leak in is_readable o n windows).: NEWS TSRM/tsrm_win32.c
| From: | Xinchen Hui | Date: | Fri, 02 Nov 2012 10:53:06 +0000 |
| Subject: | com php-src: Fixed bug #62444 (Handle leak in is_readable o n windows).: NEWS TSRM/tsrm_win32.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70491@lists.php.net to get a copy of this message | ||
Commit: 3fe3029ecb9f121eb6f535970d5cd18ecc8373a6
Author: Xinchen Hui <laruence@php.net> Fri, 2 Nov 2012 18:52:12 +0800
Parents: a2e4404bc8155e6b6d9deefa22a172857d4b5e08
Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3fe3029ecb9f121eb6f535970d5cd18ecc8373a6
Log:
Fixed bug #62444 (Handle leak in is_readable on windows).
Bugs:
https://bugs.php.net/62444
Changed paths:
M NEWS
M TSRM/tsrm_win32.c
Diff:
diff --git a/NEWS b/NEWS
index 9b87011..2e1f13b 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,10 @@ PHP NEWS
?? ??? 2012, PHP 5.3.19
- Core
- . Fixed bug #63241 PHP fails to open Windows deduplicated files.
+ . Fixed bug #63241 (PHP fails to open Windows deduplicated files).
(daniel dot stelter-gliese at innogames dot de)
+ . Fixed bug #62444 (Handle leak in is_readable on windows).
+ (krazyest at seznam dot cz)
- Libxml
. Fixed bug #63389 (Missing context check on libxml_set_streams_context()
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 9e029f6..0332768 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -193,7 +193,7 @@ Finished:
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
time_t t;
- HANDLE thread_token;
+ HANDLE thread_token = NULL;
PSID token_sid;
SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION;
GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE,
FILE_ALL_ACCESS };
@@ -365,6 +365,9 @@ Finished_Impersonate:
}
Finished:
+ if(thread_token != NULL) {
+ CloseHandle(thread_token);
+ }
if(real_path != NULL) {
free(real_path);
real_path = NULL;