]> granicus.if.org Git - php/commitdiff
- fix leak when the SID is already used and duplicated
authorPierre Joye <pajoye@php.net>
Wed, 27 Jan 2010 14:41:06 +0000 (14:41 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 27 Jan 2010 14:41:06 +0000 (14:41 +0000)
TSRM/tsrm_win32.c

index a6bb697fdd3155dc28b031bdb691538e10c8c726..f1d150067fa3bfc7efbd907b7a57e082ef63efba 100644 (file)
@@ -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)) {