diff options
author | Anatol Belski <ab@php.net> | 2017-04-27 16:03:12 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-04-27 16:03:12 +0200 |
commit | 6a010ad492ec82ce333fb4fee81fc46fc8e6a0a9 (patch) | |
tree | 9c6fd7227358e93c34c7eab3a0422f3d81e1d2da /TSRM | |
parent | 24ae881080f8cfbb56e0981973d4474a831a3398 (diff) | |
download | php-git-6a010ad492ec82ce333fb4fee81fc46fc8e6a0a9.tar.gz |
Avoid unnecessary string copy
which is the case when there's no impersonation.
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 4bd1fcb930..bb277b484b 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -115,14 +115,8 @@ char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, si size_t ptc_sid_len; if (!pSid) { - bucket_key = (char *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pathname_len + 1); - if (!bucket_key) { - *key_len = 0; - return NULL; - } - memcpy(bucket_key, pathname, pathname_len); *key_len = pathname_len; - return bucket_key; + return pathname; } if (!ConvertSidToStringSid(pSid, &ptcSid)) { |