Commit 5587d39e authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed possible infinite loop in delete_key.

parent 7e252cb5
......@@ -33,7 +33,13 @@ static DWORD delete_key( HKEY hkey )
while (!(ret = RegEnumKeyW(hkey, 0, name, sizeof(name))))
{
if ((ret = delete_key( hkey ))) break;
HKEY tmp;
if (!(ret = RegOpenKeyExW( hkey, name, 0, KEY_ENUMERATE_SUB_KEYS, &tmp )))
{
ret = delete_key( tmp );
RegCloseKey( tmp );
}
if (ret) break;
}
if (ret != ERROR_NO_MORE_ITEMS) return ret;
RegDeleteKeyA( hkey, NULL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment