mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
[NTOS:IO]: IopCreateDriver(): Set the returned DriverObject value only in case of success.
svn path=/trunk/; revision=73170
This commit is contained in:
parent
12e8ef0213
commit
98ffc124f5
|
@ -527,13 +527,14 @@ IopInitializeDriverModule(
|
|||
RtlFreeUnicodeString(&RegistryKey);
|
||||
RtlFreeUnicodeString(&DriverName);
|
||||
|
||||
*DriverObject = Driver;
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("IopCreateDriver() failed (Status 0x%08lx)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
*DriverObject = Driver;
|
||||
|
||||
MmFreeDriverInitialization((PLDR_DATA_TABLE_ENTRY)Driver->DriverSection);
|
||||
|
||||
/* Set the driver as initialized */
|
||||
|
|
Loading…
Reference in a new issue