Author: tfaber
Date: Thu Oct 22 11:05:59 2015
New Revision: 69641
URL:
http://svn.reactos.org/svn/reactos?rev=69641&view=rev
Log:
[WIN32K:NTGDI]
- Fix pool leak in failure case (CID 1322140) and don't treat NTSTATUS values as Win32
errors in NtGdiGetGlyphIndicesW.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/freetype.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Thu Oct 22 11:05:59 2015
@@ -4519,7 +4519,7 @@
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 @@
if (!Safepwc)
{
- EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return GDI_ERROR;
+ Status = STATUS_NO_MEMORY;
+ goto ErrorRet;
}
_SEH2_TRY
@@ -4587,7 +4587,7 @@
ExFreePoolWithTag(Safepwc, GDITAG_TEXT);
}
if (NT_SUCCESS(Status)) return cwc;
- EngSetLastError(Status);
+ SetLastNtError(Status);
return GDI_ERROR;
}