From 865a118a602f4b8e0523b0457a612bacc03556ec Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sat, 3 Sep 2016 16:31:27 +0000 Subject: [PATCH] [ADVAPI32] Do not report failure when closing a predefined registry key. svn path=/trunk/; revision=72550 --- reactos/dll/win32/advapi32/reg/reg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/advapi32/reg/reg.c b/reactos/dll/win32/advapi32/reg/reg.c index a692fbe0e23..4ce71e5729f 100644 --- a/reactos/dll/win32/advapi32/reg/reg.c +++ b/reactos/dll/win32/advapi32/reg/reg.c @@ -425,11 +425,16 @@ RegCloseKey(HKEY hKey) NTSTATUS Status; /* don't close null handle or a pseudo handle */ - if ((!hKey) || (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000)) + if (!hKey) { return ERROR_INVALID_HANDLE; } + if (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000) + { + return ERROR_SUCCESS; + } + Status = NtClose(hKey); if (!NT_SUCCESS(Status)) {