From: Pierre Joye Date: Wed, 27 Jan 2010 14:41:06 +0000 (+0000) Subject: - fix leak when the SID is already used and duplicated X-Git-Tag: php-5.4.0alpha1~191^2~2026 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb37a5d425b7837548fbc9cb707b081365b2a573;p=php - fix leak when the SID is already used and duplicated --- diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index a6bb697fdd..f1d150067f 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -271,6 +271,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)) {