mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
[WIN32K:NTGDI]
- Fix pool leak in failure case (CID 1322140) and don't treat NTSTATUS values as Win32 errors in NtGdiGetGlyphIndicesW. svn path=/trunk/; revision=69641
This commit is contained in:
parent
bf191a5cd2
commit
598f3dccc4
1 changed files with 4 additions and 4 deletions
|
@ -4519,7 +4519,7 @@ NtGdiGetGlyphIndicesW(
|
||||||
potm = ExAllocatePoolWithTag(PagedPool, Size, GDITAG_TEXT);
|
potm = ExAllocatePoolWithTag(PagedPool, Size, GDITAG_TEXT);
|
||||||
if (!potm)
|
if (!potm)
|
||||||
{
|
{
|
||||||
Status = ERROR_NOT_ENOUGH_MEMORY;
|
Status = STATUS_NO_MEMORY;
|
||||||
goto ErrorRet;
|
goto ErrorRet;
|
||||||
}
|
}
|
||||||
IntGetOutlineTextMetrics(FontGDI, Size, potm);
|
IntGetOutlineTextMetrics(FontGDI, Size, potm);
|
||||||
|
@ -4532,8 +4532,8 @@ NtGdiGetGlyphIndicesW(
|
||||||
|
|
||||||
if (!Safepwc)
|
if (!Safepwc)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
Status = STATUS_NO_MEMORY;
|
||||||
return GDI_ERROR;
|
goto ErrorRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -4587,7 +4587,7 @@ ErrorRet:
|
||||||
ExFreePoolWithTag(Safepwc, GDITAG_TEXT);
|
ExFreePoolWithTag(Safepwc, GDITAG_TEXT);
|
||||||
}
|
}
|
||||||
if (NT_SUCCESS(Status)) return cwc;
|
if (NT_SUCCESS(Status)) return cwc;
|
||||||
EngSetLastError(Status);
|
SetLastNtError(Status);
|
||||||
return GDI_ERROR;
|
return GDI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue