Close the key only if we have opened it (it's not the case when the subkey name is empty)
Modified: trunk/reactos/lib/setupapi/install.c

Modified: trunk/reactos/lib/setupapi/install.c
--- trunk/reactos/lib/setupapi/install.c	2005-12-24 17:56:23 UTC (rev 20323)
+++ trunk/reactos/lib/setupapi/install.c	2005-12-24 23:24:40 UTC (rev 20324)
@@ -433,10 +433,10 @@
         /* and now do it */
         if (!do_reg_operation( hkey, buffer, &context, flags ))
         {
-            RegCloseKey( hkey );
+            if (hkey != root_key) RegCloseKey( hkey );
             return FALSE;
         }
-        RegCloseKey( hkey );
+        if (hkey != root_key) RegCloseKey( hkey );
     }
     return TRUE;
 }