https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5dc56dd1d67c95dd52a3cf9803e24b0a0b3ca69c

commit 5dc56dd1d67c95dd52a3cf9803e24b0a0b3ca69c
Author:     Hervé Poussineau <[email protected]>
AuthorDate: Wed Dec 8 18:36:34 2021 +0100
Commit:     Hervé Poussineau <[email protected]>
CommitDate: Wed Dec 8 18:36:34 2021 +0100

    Revert "[VIDEOPRT] Fix updating of new registry path values"
    
    This reverts commit ecf3416f492c4b664586de89bc36f831437fe23f.
    
    This commit was meant to fix CORE-17688. While its effectively fixed
    the problem, it introduced another regression CORE-17719.
    
    In the mean time, commit c05a45e17eda057d8b92ba76feecf3532d8324c1 fixed
    things properly.
    
    CORE-17719
---
 win32ss/drivers/videoprt/registry.c | 62 ++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/win32ss/drivers/videoprt/registry.c 
b/win32ss/drivers/videoprt/registry.c
index 4fed31e451d..f5d7f4084b1 100644
--- a/win32ss/drivers/videoprt/registry.c
+++ b/win32ss/drivers/videoprt/registry.c
@@ -557,41 +557,41 @@ IntCreateNewRegistryPath(
             ERR_(VIDEOPRT, "Failed create key '%wZ'\n", 
&DeviceExtension->NewRegistryPath);
             return Status;
         }
-    }
 
-    /* Open the new key */
-    InitializeObjectAttributes(&ObjectAttributes,
-                                &DeviceExtension->NewRegistryPath,
-                                OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
-                                NULL,
-                                NULL);
-    Status = ZwOpenKey(&NewKey, KEY_READ, &ObjectAttributes);
-    if (!NT_SUCCESS(Status))
-    {
-        ERR_(VIDEOPRT, "Failed to open settings key. Status 0x%lx\n", Status);
-        return Status;
-    }
+        /* Open the new key */
+        InitializeObjectAttributes(&ObjectAttributes,
+                                   &DeviceExtension->NewRegistryPath,
+                                   OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
+                                   NULL,
+                                   NULL);
+        Status = ZwOpenKey(&NewKey, KEY_READ, &ObjectAttributes);
+        if (!NT_SUCCESS(Status))
+        {
+            ERR_(VIDEOPRT, "Failed to open settings key. Status 0x%lx\n", 
Status);
+            return Status;
+        }
 
-    /* Open the device profile key */
-    InitializeObjectAttributes(&ObjectAttributes,
-                                &DeviceExtension->RegistryPath,
-                                OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
-                                NULL,
-                                NULL);
-    Status = ZwOpenKey(&SettingsKey, KEY_READ, &ObjectAttributes);
-    if (!NT_SUCCESS(Status))
-    {
-        ERR_(VIDEOPRT, "Failed to open settings key. Status 0x%lx\n", Status);
-        ObCloseHandle(NewKey, KernelMode);
-        return Status;
-    }
+        /* Open the device profile key */
+        InitializeObjectAttributes(&ObjectAttributes,
+                                   &DeviceExtension->RegistryPath,
+                                   OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
+                                   NULL,
+                                   NULL);
+        Status = ZwOpenKey(&SettingsKey, KEY_READ, &ObjectAttributes);
+        if (!NT_SUCCESS(Status))
+        {
+            ERR_(VIDEOPRT, "Failed to open settings key. Status 0x%lx\n", 
Status);
+            ObCloseHandle(NewKey, KernelMode);
+            return Status;
+        }
 
-    /* Copy the registry data from the legacy key */
-    Status = IntCopyRegistryKey(SettingsKey, NewKey);
+        /* Copy the registry data from the legacy key */
+        Status = IntCopyRegistryKey(SettingsKey, NewKey);
 
-    /* Close the key handles */
-    ObCloseHandle(SettingsKey, KernelMode);
-    ObCloseHandle(NewKey, KernelMode);
+        /* Close the key handles */
+        ObCloseHandle(SettingsKey, KernelMode);
+        ObCloseHandle(NewKey, KernelMode);
+    }
 
     return Status;
 }

Reply via email to