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);
Author: tfaber
Date: Sat Apr 8 09:26:42 2017
New Revision: 74283
URL: http://svn.reactos.org/svn/reactos?rev=74283&view=rev
Log:
[NTOS:IO]
- Make debug prints about IopOpenRegistryKeyEx failure consistent
Modified:
trunk/reactos/ntoskrnl/io/iomgr/driver.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Sat Apr 8 09:26:42 2017
@@ -337,7 +337,7 @@
Status = IopOpenRegistryKeyEx(&CCSKey, NULL, &CCSName, KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with Status %08X\n",
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
&CCSName, Status);
return Status;
}
@@ -346,7 +346,7 @@
Status = IopOpenRegistryKeyEx(&ServiceKey, CCSKey, ServiceName, KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with Status %08X\n",
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
ServiceName, Status);
ZwClose(CCSKey);
return Status;
@@ -656,7 +656,8 @@
KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &EnumRoot, Status);
return Status;
}
@@ -667,7 +668,8 @@
KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &DeviceNode->InstancePath, Status);
ZwClose(EnumRootKey);
return Status;
}
@@ -731,7 +733,8 @@
KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &ControlClass, Status);
return Status;
}
@@ -743,7 +746,8 @@
if (!NT_SUCCESS(Status))
{
/* It's okay if there's no class key */
- DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &Class, Status);
ZwClose(EnumRootKey);
return STATUS_SUCCESS;
}
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] Sat Apr 8 09:26:42 2017
@@ -268,7 +268,8 @@
KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &EnumRoot, Status);
return Status;
}
@@ -280,7 +281,8 @@
ZwClose(EnumRootKey);
if (!NT_SUCCESS(Status))
{
- DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &DeviceNode->InstancePath, Status);
return Status;
}
@@ -304,7 +306,8 @@
if (!NT_SUCCESS(Status))
{
/* No class key */
- DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &ControlClass, Status);
ClassKey = NULL;
}
else
@@ -318,7 +321,8 @@
if (!NT_SUCCESS(Status))
{
/* No class key */
- DPRINT1("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &ClassGuid, Status);
ClassKey = NULL;
}
}
@@ -336,7 +340,8 @@
if (!NT_SUCCESS(Status))
{
/* No properties */
- DPRINT("IopOpenRegistryKeyEx() failed with Status %08X\n", Status);
+ DPRINT("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &Properties, Status);
PropertiesKey = NULL;
}
else
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnproot…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnproot.c [iso-8859-1] Sat Apr 8 09:26:42 2017
@@ -525,7 +525,8 @@
Status = IopOpenRegistryKeyEx(&SubKeyHandle, KeyHandle, &SubKeyName, KEY_ENUMERATE_SUB_KEYS);
if (!NT_SUCCESS(Status))
{
- DPRINT("IopOpenRegistryKeyEx() failed with status 0x%08lx\n", Status);
+ DPRINT("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &SubKeyName, Status);
break;
}
@@ -585,7 +586,8 @@
Status = IopOpenRegistryKeyEx(&DeviceKeyHandle, SubKeyHandle, &Device->InstanceID, KEY_READ);
if (!NT_SUCCESS(Status))
{
- DPRINT1("IopOpenRegistryKeyEx() failed with status 0x%08lx\n", Status);
+ DPRINT1("IopOpenRegistryKeyEx() failed for '%wZ' with status 0x%lx\n",
+ &Device->InstanceID, Status);
break;
}