diff --git a/ntoskrnl/config/ntapi.c b/ntoskrnl/config/ntapi.c index 6748326a2c8..f425b3a79e0 100644 --- a/ntoskrnl/config/ntapi.c +++ b/ntoskrnl/config/ntapi.c @@ -1953,6 +1953,7 @@ NtUnloadKey2(IN POBJECT_ATTRIBUTES TargetKey, _SEH2_END; } +Quit: /* If CmUnloadKey() failed we need to unlock registry ourselves */ if (!NT_SUCCESS(Status)) { @@ -1969,7 +1970,6 @@ NtUnloadKey2(IN POBJECT_ATTRIBUTES TargetKey, CmpUnlockRegistry(); } -Quit: /* Dereference the key */ ObDereferenceObject(KeyBody);