- Fixed a length calculation in IopInitializeDriverModule.

- Freed the memory from hal.dll.

svn path=/trunk/; revision=12697
This commit is contained in:
Hartmut Birr 2005-01-01 11:53:38 +00:00
parent adecdb10c6
commit 38d12a5ce6

View file

@ -534,7 +534,7 @@ IopInitializeDriverModule(
if (DeviceNode->ServiceName.Buffer)
{
RegistryKey.Length = DeviceNode->ServiceName.Length +
sizeof(ServicesKeyName);
sizeof(ServicesKeyName) - sizeof(UNICODE_NULL);
RegistryKey.MaximumLength = RegistryKey.Length + sizeof(UNICODE_NULL);
RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength);
wcscpy(RegistryKey.Buffer, ServicesKeyName);
@ -1234,10 +1234,10 @@ IopInitializeBootDrivers(VOID)
}
/*
* Free memory for all boot files, except ntoskrnl.exe, hal.dll
* Free memory for all boot files, except ntoskrnl.exe
* and symbol files, if the kernel debugger is active
*/
if (_stricmp(Extension, ".exe") && _stricmp(Extension, ".dll")
if (i != 0 /* ntoskrnl.exe is always the first module */
#if defined(DBG) || defined(KDBG)
&& _stricmp(Extension, ".sym")
#endif