diff --git a/reactos/ntoskrnl/config/ntapi.c b/reactos/ntoskrnl/config/ntapi.c index 860d4412429..3a95860dd1f 100644 --- a/reactos/ntoskrnl/config/ntapi.c +++ b/reactos/ntoskrnl/config/ntapi.c @@ -44,11 +44,10 @@ NtCreateKey(OUT PHANDLE KeyHandle, if (Class) { /* Probe it */ - ProbeForReadUnicodeString(Class); + ParseContext.Class = ProbeForReadUnicodeString(Class); ProbeForRead(ParseContext.Class.Buffer, ParseContext.Class.Length, sizeof(WCHAR)); - ParseContext.Class = *Class; } /* Probe the key handle */ diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 3948edcd80a..a7153d42942 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -374,8 +374,7 @@ ObpCaptureObjectName(IN OUT PUNICODE_STRING CapturedName, if (AccessMode != KernelMode) { /* First Probe the String */ - ProbeForReadUnicodeString(ObjectName); - LocalName = *ObjectName; + LocalName = ProbeForReadUnicodeString(ObjectName); ProbeForRead(LocalName.Buffer, LocalName.Length, sizeof(WCHAR)); } else