mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +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
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue