mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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;
|
||||
PDEVMODEW pdmwInput = NULL;
|
||||
PDEVMODEW pdmwOutput = NULL;
|
||||
BOOL bReturnValue = -1;
|
||||
LONG lReturnValue = -1;
|
||||
DWORD cch;
|
||||
|
||||
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);
|
||||
FIXME("bReturnValue from DocumentPropertiesW is '%ld'.\n", bReturnValue);
|
||||
lReturnValue = DocumentPropertiesW(hWnd, hPrinter, pwszDeviceName, pdmwOutput, pdmwInput, fMode);
|
||||
FIXME("lReturnValue from DocumentPropertiesW is '%ld'.\n", lReturnValue);
|
||||
|
||||
if (pwszDeviceName)
|
||||
{
|
||||
HeapFree(hProcessHeap, 0, pwszDeviceName);
|
||||
}
|
||||
|
||||
if (bReturnValue < 0)
|
||||
if (lReturnValue < 0)
|
||||
{
|
||||
FIXME("DocumentPropertiesW failed!\n");
|
||||
goto Cleanup;
|
||||
|
@ -745,7 +740,7 @@ Cleanup:
|
|||
if (pdmwOutput)
|
||||
HeapFree(hProcessHeap, 0, pdmwOutput);
|
||||
|
||||
return bReturnValue;
|
||||
return lReturnValue;
|
||||
}
|
||||
|
||||
PRINTER_INFO_9W * get_devmodeW(HANDLE hprn)
|
||||
|
|
Loading…
Reference in a new issue