JDK-8389509

This commit is contained in:
MBaesken 2026-07-31 15:19:32 +02:00
parent 6b590fd86d
commit 63603139bb

View File

@ -4259,6 +4259,12 @@ static BOOL SetPrinterDevice(LPTSTR pszDeviceName, HGLOBAL* p_hDevMode,
// Allocate a global handle big enough to hold DEVNAMES.
HGLOBAL hDevNames = ::GlobalAlloc(GHND, devNameSize);
if (hDevNames == NULL) {
::GlobalFree(hDevMode);
::GlobalFree(p2);
return FALSE;
}
DEVNAMES* pDevNames = (DEVNAMES*)::GlobalLock(hDevNames);
// Copy the DEVNAMES information from PRINTER_INFO_2 structure.