Commit 2ffcce16 authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

ntdll: Fix leak of mach_host_self port.

parent 317085fd
......@@ -2624,8 +2624,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
{
processor_cpu_load_info_data_t *pinfo;
mach_msg_type_number_t info_count;
host_name_port_t host = mach_host_self ();
if (host_processor_info( mach_host_self (),
if (host_processor_info( host,
PROCESSOR_CPU_LOAD_INFO,
&cpus,
(processor_info_array_t*)&pinfo,
......@@ -2641,6 +2642,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
vm_deallocate (mach_task_self (), (vm_address_t) pinfo, info_count * sizeof(natural_t));
}
mach_port_deallocate (mach_task_self (), host);
}
#elif defined(linux)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment