[ros-diffs] [hpoussin] 20324: Close the key only if we have opened it (it's not the case when the subkey name is empty)

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Sun Dec 25 00:24:44 CET 2005


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;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051225/791f0937/attachment.html


More information about the Ros-diffs mailing list