mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[GDI32] Fix memory leak in case of public DC. CORE-18498
This commit is contained in:
parent
f34e425e1a
commit
8b19b6ec5a
1 changed files with 7 additions and 2 deletions
|
@ -756,8 +756,10 @@ SetDIBitsToDevice(
|
|||
|
||||
if (!GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID) & pDc_Attr))
|
||||
{
|
||||
DPRINT1("SetDIBitsToDevice called on invalid DC %p (not owned?)\n", hdc);
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
LinesCopied = 0;
|
||||
goto Exit;
|
||||
}
|
||||
/*
|
||||
if ( !pDc_Attr || // DC is Public
|
||||
|
@ -867,8 +869,10 @@ StretchDIBits(
|
|||
|
||||
if (!GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID) & pDc_Attr))
|
||||
{
|
||||
DPRINT1("StretchDIBits called on invalid DC %p (not owned?)\n", hdc);
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
LinesCopied = 0;
|
||||
goto Exit;
|
||||
}
|
||||
/*
|
||||
if ( !pDc_Attr ||
|
||||
|
@ -894,6 +898,7 @@ StretchDIBits(
|
|||
cjBmpScanSize,
|
||||
NULL );
|
||||
}
|
||||
Exit:
|
||||
if (pvSafeBits)
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, pvSafeBits);
|
||||
if (lpBitsInfo != pConvertedInfo)
|
||||
|
|
Loading…
Reference in a new issue