ntdll: Zero-init the buffer for non-linux versions of SystemProcessorPerformanceInformation.

This ensures that the unused fields are set to zero, which matches the linux version.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2016-10-24 14:11:55 +01:00 committed by Alexandre Julliard
parent c3dbe44347
commit 47303892ac
1 changed files with 2 additions and 2 deletions

View File

@ -2062,7 +2062,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
int i;
cpus = min(cpus,out_cpus);
len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * cpus;
sppi = RtlAllocateHeap(GetProcessHeap(), 0,len);
sppi = RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
for (i = 0; i < cpus; i++)
{
sppi[i].IdleTime.QuadPart = pinfo[i].cpu_ticks[CPU_STATE_IDLE];
@ -2118,7 +2118,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
unsigned int n;
cpus = min(NtCurrentTeb()->Peb->NumberOfProcessors, out_cpus);
len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * cpus;
sppi = RtlAllocateHeap(GetProcessHeap(), 0, len);
sppi = RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
FIXME("stub info_class SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION\n");
/* many programs expect these values to change so fake change */
for (n = 0; n < cpus; n++)