projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb1dc0b
)
- fix leak when the SID is already used and duplicated
author
Pierre Joye
<pajoye@php.net>
Wed, 27 Jan 2010 14:41:06 +0000
(14:41 +0000)
committer
Pierre Joye
<pajoye@php.net>
Wed, 27 Jan 2010 14:41:06 +0000
(14:41 +0000)
TSRM/tsrm_win32.c
patch
|
blob
|
history
diff --git
a/TSRM/tsrm_win32.c
b/TSRM/tsrm_win32.c
index 7b2deceb54d906dcc4e87fe67d31c3a541fa0e44..67742f0b389307e263fbf4d068dca643ba4a09ad 100644
(file)
--- a/
TSRM/tsrm_win32.c
+++ b/
TSRM/tsrm_win32.c
@@
-170,6
+170,7
@@
PSID tsrm_win32_get_token_sid(HANDLE hToken)
/* ConvertSidToStringSid(pTokenUser->User.Sid, &ptcSidOwner); */
pResultSid = malloc(sid_len);
+
if (!pResultSid) {
goto Finished;
}
@@
-271,6
+272,9
@@
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
if (!DuplicateToken(thread_token, SecurityImpersonation, &TWG(impersonation_token))) {
goto Finished;
}
+ } else {
+ /* we already have it, free it then */
+ free(token_sid);
}
if (CWDG(realpath_cache_size_limit)) {