[ros-diffs] [sginsberg] 36486: - Only dereference the KCB if we know it exists - Fix for Coverity error CID: 279

sginsberg at svn.reactos.org sginsberg at svn.reactos.org
Wed Sep 24 18:19:52 CEST 2008


Author: sginsberg
Date: Wed Sep 24 11:19:52 2008
New Revision: 36486

URL: http://svn.reactos.org/svn/reactos?rev=36486&view=rev
Log:
- Only dereference the KCB if we know it exists
- Fix for Coverity error CID: 279

Modified:
    trunk/reactos/ntoskrnl/config/cmsysini.c

Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c?rev=36486&r1=36485&r2=36486&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Wed Sep 24 11:19:52 2008
@@ -71,11 +71,10 @@
         {
             /* Delist the key */
             DelistKeyBodyFromKCB(KeyBody, FALSE);
+
+            /* Dereference the KCB */
+            CmpDelayDerefKeyControlBlock(Kcb);
         }
-        
-        /* Dereference the KCB */
-        CmpDelayDerefKeyControlBlock(Kcb);
-        
     }
     
     /* Release the registry lock */



More information about the Ros-diffs mailing list