mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
Fixed possible infinite loop in delete_key.
This commit is contained in:
parent
7e252cb5ef
commit
5587d39e9c
1 changed files with 7 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue