Author: mjansen
Date: Sat Apr 8 19:06:46 2017
New Revision: 74286
URL:
http://svn.reactos.org/svn/reactos?rev=74286&view=rev
Log:
[WIN32SS] Addendum to r74285, actually leak the pointer used by Freetype, so that when it
is accessed later, we have not freed it.
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] Sat Apr 8 19:06:46 2017
@@ -1070,8 +1070,16 @@
INT FontCount;
HANDLE Ret = 0;
+ /* We leak this buffer for now, same as all fonts do with their buffer! */
+ LoadFont.Buffer = ExAllocatePoolWithTag(PagedPool, dwSize, TAG_FONT);
+ if (!LoadFont.Buffer)
+ {
+ *pNumAdded = 0;
+ return NULL;
+ }
+ memcpy(LoadFont.Buffer, Buffer, dwSize);
+
LoadFont.pFileName = NULL;
- LoadFont.Buffer = Buffer;
LoadFont.BufferSize = dwSize;
LoadFont.Characteristics = FR_PRIVATE | FR_NOT_ENUM;
RtlInitUnicodeString(&LoadFont.RegValueName, NULL);