mirror of
https://github.com/reactos/reactos.git
synced 2024-08-26 13:18:51 +00:00
[LOCALMON]
- Avoid a potential double free in InitializePrintMonitor2. CID 1401299 - Avoid a use after free in LocalmonClosePort. CID 1401298 svn path=/trunk/; revision=73835
This commit is contained in:
parent
cf3310e4e9
commit
0ba77df60d
|
@ -223,6 +223,7 @@ InitializePrintMonitor2(PMONITORINIT pMonitorInit, PHANDLE phMonitor)
|
||||||
if (!cchPortName || _IsNEPort(pPort->pwszPortName))
|
if (!cchPortName || _IsNEPort(pPort->pwszPortName))
|
||||||
{
|
{
|
||||||
DllFreeSplMem(pPort);
|
DllFreeSplMem(pPort);
|
||||||
|
pPort = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -541,8 +541,8 @@ LocalmonClosePort(HANDLE hPort)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&pPort->pLocalmon->Section);
|
EnterCriticalSection(&pPort->pLocalmon->Section);
|
||||||
RemoveEntryList(&pPort->Entry);
|
RemoveEntryList(&pPort->Entry);
|
||||||
DllFreeSplMem(pPort);
|
|
||||||
LeaveCriticalSection(&pPort->pLocalmon->Section);
|
LeaveCriticalSection(&pPort->pLocalmon->Section);
|
||||||
|
DllFreeSplMem(pPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue