[NTOSKRNL]

Don't attempt to free random address
Don't attempt to free null address

svn path=/trunk/; revision=54479
This commit is contained in:
Pierre Schweitzer 2011-11-22 22:07:35 +00:00
parent ef3f455441
commit 235d1c5a42

View file

@ -1245,7 +1245,7 @@ IopGetParentIdPrefix(PDEVICE_NODE DeviceNode,
{
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,11 +1267,9 @@ IopGetParentIdPrefix(PDEVICE_NODE DeviceNode,
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)
{