From 598f3dccc4aaa9e003b3273621073fae71a161c1 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Thu, 22 Oct 2015 11:05:59 +0000 Subject: [PATCH] [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 --- reactos/win32ss/gdi/ntgdi/freetype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/freetype.c b/reactos/win32ss/gdi/ntgdi/freetype.c index 45fb25c79d8..8bdca858bdd 100644 --- a/reactos/win32ss/gdi/ntgdi/freetype.c +++ b/reactos/win32ss/gdi/ntgdi/freetype.c @@ -4519,7 +4519,7 @@ NtGdiGetGlyphIndicesW( potm = ExAllocatePoolWithTag(PagedPool, Size, GDITAG_TEXT); if (!potm) { - Status = ERROR_NOT_ENOUGH_MEMORY; + Status = STATUS_NO_MEMORY; goto ErrorRet; } IntGetOutlineTextMetrics(FontGDI, Size, potm); @@ -4532,8 +4532,8 @@ NtGdiGetGlyphIndicesW( if (!Safepwc) { - EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); - return GDI_ERROR; + Status = STATUS_NO_MEMORY; + goto ErrorRet; } _SEH2_TRY @@ -4587,7 +4587,7 @@ ErrorRet: ExFreePoolWithTag(Safepwc, GDITAG_TEXT); } if (NT_SUCCESS(Status)) return cwc; - EngSetLastError(Status); + SetLastNtError(Status); return GDI_ERROR; } -- 2.17.1