[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:
Thomas Faber 2015-10-22 11:05:59 +00:00
parent bf191a5cd2
commit 598f3dccc4

View file

@ -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;
} }