Author: mjansen
Date: Fri Apr 14 21:22:18 2017
New Revision: 74316
URL:
http://svn.reactos.org/svn/reactos?rev=74316&view=rev
Log:
[WIN32SS] Addendum to r74312 and r74309, fix some bad memory leaks. CORE-10876
Thanks Giannis and Thomas :)
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] Fri Apr 14 21:22:18 2017
@@ -2052,7 +2052,7 @@
NTSTATUS Status = STATUS_NOT_FOUND;
ANSI_STRING AnsiName;
- RtlInitUnicodeString(pNameW, NULL);
+ RtlFreeUnicodeString(pNameW);
Count = FT_Get_Sfnt_Name_Count(Face);
for (i = 0; i < Count; ++i)
@@ -2202,6 +2202,7 @@
else
{
UNICODE_STRING NameW;
+ RtlInitUnicodeString(&NameW, NULL);
status = IntGetFontLocalizedName(&NameW, Face, TT_NAME_ID_FONT_FAMILY,
gusLanguageID);
if (NT_SUCCESS(status))
@@ -2640,6 +2641,7 @@
{
DPRINT1("Conversion failed\n");
ExFreePoolWithTag(NewEntry, TAG_FONT);
+ FT_Bitmap_Done(GlyphSlot->library, &AlignedBitmap);
FT_Done_Glyph((FT_Glyph)BitmapGlyph);
return NULL;
}