mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Check the return value of LdrProcessModule instead of uninitialized variable.
svn path=/trunk/; revision=12305
This commit is contained in:
parent
09e71d4f7d
commit
630b572695
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: driver.c,v 1.56 2004/12/09 14:20:06 royce Exp $
|
||||
/* $Id: driver.c,v 1.57 2004/12/23 23:33:54 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1126,12 +1126,12 @@ IopInitializeBuiltinDriver(
|
|||
FileNameWithoutPath);
|
||||
Status = LdrProcessModule(ModuleLoadBase, &DeviceNode->ServiceName,
|
||||
&ModuleObject);
|
||||
if (ModuleObject == NULL)
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
if (ModuleDeviceNode == NULL)
|
||||
IopFreeDeviceNode(DeviceNode);
|
||||
CPRINT("Driver load failed, status (%x)\n", Status);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue