Don't fail when there are no more subkeys to delete in RegDeleteTree()
Modified: trunk/reactos/lib/advapi32/reg/reg.c
_____
Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c 2005-10-03 21:35:12 UTC
(rev 18251)
+++ trunk/reactos/lib/advapi32/reg/reg.c 2005-10-03 21:37:05 UTC
(rev 18252)
@@ -1404,7 +1404,7 @@
/* open the subkey */
Status2 = NtOpenKey(&newDelKeys->KeyHandle,
- DELETE | KEY_ENUMERATE_SUB_KEYS |
KEY_QUERY_VALUE,
+ DELETE | KEY_ENUMERATE_SUB_KEYS,
&ObjectAttributes);
if (!NT_SUCCESS(Status2))
{
@@ -1464,6 +1464,11 @@
Status2 = STATUS_INSUFFICIENT_RESOURCES;
}
}
+ else if (Status2 == STATUS_NO_MORE_ENTRIES)
+ {
+ ASSERT(newDelKeys == NULL);
+ break;
+ }
SubKeyFailure:
ASSERT(newDelKeys != NULL);
@@ -1511,7 +1516,7 @@
}
else
Status = STATUS_INSUFFICIENT_RESOURCES;
-
+
return Status;
}
Show replies by date