[ros-diffs] [fireball] 36602: - Don't leak registry lock in failure branches of CmpParseKey. Spotted by Timo.
fireball at svn.reactos.org
fireball at svn.reactos.org
Tue Sep 30 20:44:22 CEST 2008
Author: fireball
Date: Tue Sep 30 13:44:22 2008
New Revision: 36602
URL: http://svn.reactos.org/svn/reactos?rev=36602&view=rev
Log:
- Don't leak registry lock in failure branches of CmpParseKey. Spotted by Timo.
Modified:
trunk/reactos/ntoskrnl/config/cmparse.c
Modified: trunk/reactos/ntoskrnl/config/cmparse.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?rev=36602&r1=36601&r2=36602&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Tue Sep 30 13:44:22 2008
@@ -1042,10 +1042,14 @@
/* Check if everything was found cached */
if (!TotalRemainingSubkeys) ASSERTMSG("Caching not implemented", FALSE);
-
+
/* Don't do anything if we're being deleted */
- if (Kcb->Delete) return STATUS_OBJECT_NAME_NOT_FOUND;
-
+ if (Kcb->Delete)
+ {
+ Status = STATUS_OBJECT_NAME_NOT_FOUND;
+ goto Quickie;
+ }
+
/* Check if this is a symlink */
if (Kcb->Flags & KEY_SYM_LINK)
{
@@ -1092,8 +1096,12 @@
/* Get the key node */
Node = (PCM_KEY_NODE)HvGetCell(Hive, Cell);
- if (!Node) return STATUS_INSUFFICIENT_RESOURCES;
-
+ if (!Node)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ goto Quickie;
+ }
+
/* Start parsing */
Status = STATUS_NOT_IMPLEMENTED;
while (TRUE)
More information about the Ros-diffs
mailing list