Author: pschweitzer
Date: Tue Nov 22 22:07:35 2011
New Revision: 54479
URL:
http://svn.reactos.org/svn/reactos?rev=54479&view=rev
Log:
[NTOSKRNL]
Don't attempt to free random address
Don't attempt to free null address
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Tue Nov 22 22:07:35 2011
@@ -1245,7 +1245,7 @@
{
ULONG KeyNameBufferLength;
PKEY_VALUE_PARTIAL_INFORMATION ParentIdPrefixInformation = NULL;
- UNICODE_STRING KeyName;
+ UNICODE_STRING KeyName = {0, 0, NULL};
UNICODE_STRING KeyValue;
UNICODE_STRING ValueName;
HANDLE hKey = NULL;
@@ -1267,10 +1267,8 @@
ParentIdPrefixInformation = ExAllocatePool(PagedPool, KeyNameBufferLength +
sizeof(WCHAR));
if (!ParentIdPrefixInformation)
{
- Status = STATUS_INSUFFICIENT_RESOURCES;
- goto cleanup;
- }
-
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
KeyName.Buffer = ExAllocatePool(PagedPool, (49 * sizeof(WCHAR)) +
DeviceNode->Parent->InstancePath.Length);
if (!KeyName.Buffer)