winedevice: Do not omit mandatory argument for VirtualProtect.

This commit is contained in:
Sebastian Lackner 2015-05-02 18:43:34 +02:00 committed by Alexandre Julliard
parent 64ee8a4a53
commit c16f0644be
1 changed files with 2 additions and 2 deletions

View File

@ -98,14 +98,14 @@ static HMODULE load_driver_module( const WCHAR *name )
VirtualProtect( page, info.PageSize, PAGE_EXECUTE_READWRITE, &old );
rel = LdrProcessRelocationBlock( page, (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT),
(USHORT *)(rel + 1), delta );
if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, NULL );
if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, &old );
if (!rel) goto error;
}
/* make sure we don't try again */
size = FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + nt->FileHeader.SizeOfOptionalHeader;
VirtualProtect( nt, size, PAGE_READWRITE, &old );
nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0;
VirtualProtect( nt, size, old, NULL );
VirtualProtect( nt, size, old, &old );
}
}