From 76714ec4066ee816e2229e9e59e4cb84f9584912 Mon Sep 17 00:00:00 2001 From: Peter Oberndorfer Date: Tue, 1 Jan 2008 19:32:45 +0100 Subject: [PATCH] ntdll: NtCreateSection do not pass unneeded OBJECT_ATTRIBUTES pointer there is a test that shows a NULL pointer is OK and we don't pass special information in this case there are probably more occurances of this unneeded passing that should also be fixed --- dlls/ntdll/loader.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 2456d3879c8..df10de4e3a4 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1389,7 +1389,6 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, { void *module; HANDLE mapping; - OBJECT_ATTRIBUTES attr; LARGE_INTEGER size; IMAGE_NT_HEADERS *nt; SIZE_T len = 0; @@ -1399,16 +1398,10 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, TRACE("Trying native dll %s\n", debugstr_w(name)); - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = NULL; - attr.Attributes = 0; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; size.QuadPart = 0; status = NtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ, - &attr, &size, 0, SEC_IMAGE, file ); + NULL, &size, 0, SEC_IMAGE, file ); if (status != STATUS_SUCCESS) return status; module = NULL; -- 2.11.4.GIT