mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
[FLTMGR] CreateClientPort(): Fix ObInsertObject() error handling
Avoid extra ObDereferenceObject(). CORE-17904
This commit is contained in:
parent
a23249e137
commit
5ba5051f79
1 changed files with 4 additions and 2 deletions
|
@ -699,10 +699,12 @@ CreateClientPort(_In_ PFILE_OBJECT FileObject,
|
||||||
goto Quit;
|
goto Quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now insert the new client port into the object manager*/
|
/* Now insert the new client port into the object manager */
|
||||||
Status = ObInsertObject(ClientPortObject, 0, FLT_PORT_ALL_ACCESS, 1, 0, (PHANDLE)&PortHandle);
|
Status = ObInsertObject(ClientPortObject, NULL, FLT_PORT_ALL_ACCESS, 1, NULL, (PHANDLE)&PortHandle);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
/* ObInsertObject() failed and already dereferenced ClientPortObject */
|
||||||
|
ClientPortObject = NULL;
|
||||||
goto Quit;
|
goto Quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue