if (!NT_SUCCESS(Status))
{
+ ExFreePool(Node->ServiceName.Buffer);
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
return Status;
}
HANDLE hParent = NULL, hKey;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
- LPCWSTR Current, Last;
+ PCWSTR Current, Last;
USHORT Length;
NTSTATUS Status;
/* Go up to the end of the string */
while (Current <= Last)
{
- if (Current != Last && *Current != '\\')
+ if (Current != Last && *Current != L'\\')
{
/* Not the end of the string and not a separator */
Current++;
/* Start with this new parent key */
hParent = hKey;
Current++;
- KeyName.Buffer = (LPWSTR)Current;
+ KeyName.Buffer = (PWSTR)Current;
}
return STATUS_UNSUCCESSFUL;
static WCHAR EnumKeyName[] = L"Enum\\";
static WCHAR DeviceParametersKeyName[] = L"Device Parameters";
ULONG KeyNameLength;
- LPWSTR KeyNameBuffer;
+ PWSTR KeyNameBuffer;
UNICODE_STRING KeyName;
ULONG DriverKeyLength;
OBJECT_ATTRIBUTES ObjectAttributes;