mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[NTOS:LPC]
- Avoid dereferencing a null pointer in LpcpDeletePort. By Samuel Serapión. CORE-6850 #resolve svn path=/trunk/; revision=71673
This commit is contained in:
parent
b25491463d
commit
d19532d463
1 changed files with 9 additions and 9 deletions
|
@ -432,6 +432,15 @@ LpcpDeletePort(IN PVOID ObjectBody)
|
|||
|
||||
/* Dereference the object unless it's the same port */
|
||||
if (ConnectionPort != Port) ObDereferenceObject(ConnectionPort);
|
||||
|
||||
/* Check if this is a connection port with a server process */
|
||||
if (((Port->Flags & LPCP_PORT_TYPE_MASK) == LPCP_CONNECTION_PORT) &&
|
||||
(ConnectionPort->ServerProcess))
|
||||
{
|
||||
/* Dereference the server process */
|
||||
ObDereferenceObject(ConnectionPort->ServerProcess);
|
||||
ConnectionPort->ServerProcess = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -439,15 +448,6 @@ LpcpDeletePort(IN PVOID ObjectBody)
|
|||
KeReleaseGuardedMutex(&LpcpLock);
|
||||
}
|
||||
|
||||
/* Check if this is a connection port with a server process */
|
||||
if (((Port->Flags & LPCP_PORT_TYPE_MASK) == LPCP_CONNECTION_PORT) &&
|
||||
(ConnectionPort->ServerProcess))
|
||||
{
|
||||
/* Dereference the server process */
|
||||
ObDereferenceObject(ConnectionPort->ServerProcess);
|
||||
ConnectionPort->ServerProcess = NULL;
|
||||
}
|
||||
|
||||
/* Free client security */
|
||||
LpcpFreePortClientSecurity(Port);
|
||||
LPCTRACE(LPC_CLOSE_DEBUG, "Port: %p deleted\n", Port);
|
||||
|
|
Loading…
Reference in a new issue