mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +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;
|
||||
}
|
||||
|
||||
/* Now insert the new client port into the object manager*/
|
||||
Status = ObInsertObject(ClientPortObject, 0, FLT_PORT_ALL_ACCESS, 1, 0, (PHANDLE)&PortHandle);
|
||||
/* Now insert the new client port into the object manager */
|
||||
Status = ObInsertObject(ClientPortObject, NULL, FLT_PORT_ALL_ACCESS, 1, NULL, (PHANDLE)&PortHandle);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* ObInsertObject() failed and already dereferenced ClientPortObject */
|
||||
ClientPortObject = NULL;
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue