diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index b4478113bbb..49ea273d21f 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -71,11 +71,10 @@ CmpDeleteKeyObject(PVOID DeletedObject) { /* Delist the key */ DelistKeyBodyFromKCB(KeyBody, FALSE); + + /* Dereference the KCB */ + CmpDelayDerefKeyControlBlock(Kcb); } - - /* Dereference the KCB */ - CmpDelayDerefKeyControlBlock(Kcb); - } /* Release the registry lock */