mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -223,6 +223,7 @@ InitializePrintMonitor2(PMONITORINIT pMonitorInit, PHANDLE phMonitor)
|
||||
if (!cchPortName || _IsNEPort(pPort->pwszPortName))
|
||||
{
|
||||
DllFreeSplMem(pPort);
|
||||
pPort = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -541,8 +541,8 @@ LocalmonClosePort(HANDLE hPort)
|
||||
{
|
||||
EnterCriticalSection(&pPort->pLocalmon->Section);
|
||||
RemoveEntryList(&pPort->Entry);
|
||||
DllFreeSplMem(pPort);
|
||||
LeaveCriticalSection(&pPort->pLocalmon->Section);
|
||||
DllFreeSplMem(pPort);
|
||||
}
|
||||
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user