mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 17:00:31 +00:00
[WINSPOOL] Properly fix a double free CORE-16715
Addendum to 0.4.14-dev-957-g
d90beaeed2
Many Thanks to the patches author Doug Lyons!
This commit is contained in:
parent
1f0bbb3050
commit
dde92f8ffa
1 changed files with 5 additions and 10 deletions
|
@ -668,7 +668,7 @@ DocumentPropertiesA(HWND hWnd, HANDLE hPrinter, LPSTR pDeviceName, PDEVMODEA pDe
|
||||||
PWSTR pwszDeviceName = NULL;
|
PWSTR pwszDeviceName = NULL;
|
||||||
PDEVMODEW pdmwInput = NULL;
|
PDEVMODEW pdmwInput = NULL;
|
||||||
PDEVMODEW pdmwOutput = NULL;
|
PDEVMODEW pdmwOutput = NULL;
|
||||||
BOOL bReturnValue = -1;
|
LONG lReturnValue = -1;
|
||||||
DWORD cch;
|
DWORD cch;
|
||||||
|
|
||||||
FIXME("DocumentPropertiesA(%p, %p, %s, %p, %p, %lu)\n", hWnd, hPrinter, pDeviceName, pDevModeOutput, pDevModeInput, fMode);
|
FIXME("DocumentPropertiesA(%p, %p, %s, %p, %p, %lu)\n", hWnd, hPrinter, pDeviceName, pDevModeOutput, pDevModeInput, fMode);
|
||||||
|
@ -716,15 +716,10 @@ DocumentPropertiesA(HWND hWnd, HANDLE hPrinter, LPSTR pDeviceName, PDEVMODEA pDe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bReturnValue = DocumentPropertiesW(hWnd, hPrinter, pwszDeviceName, pdmwOutput, pdmwInput, fMode);
|
lReturnValue = DocumentPropertiesW(hWnd, hPrinter, pwszDeviceName, pdmwOutput, pdmwInput, fMode);
|
||||||
FIXME("bReturnValue from DocumentPropertiesW is '%ld'.\n", bReturnValue);
|
FIXME("lReturnValue from DocumentPropertiesW is '%ld'.\n", lReturnValue);
|
||||||
|
|
||||||
if (pwszDeviceName)
|
if (lReturnValue < 0)
|
||||||
{
|
|
||||||
HeapFree(hProcessHeap, 0, pwszDeviceName);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bReturnValue < 0)
|
|
||||||
{
|
{
|
||||||
FIXME("DocumentPropertiesW failed!\n");
|
FIXME("DocumentPropertiesW failed!\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
@ -745,7 +740,7 @@ Cleanup:
|
||||||
if (pdmwOutput)
|
if (pdmwOutput)
|
||||||
HeapFree(hProcessHeap, 0, pdmwOutput);
|
HeapFree(hProcessHeap, 0, pdmwOutput);
|
||||||
|
|
||||||
return bReturnValue;
|
return lReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTER_INFO_9W * get_devmodeW(HANDLE hprn)
|
PRINTER_INFO_9W * get_devmodeW(HANDLE hprn)
|
||||||
|
|
Loading…
Reference in a new issue