reg: Call RegCloseKey before exiting if the user chooses to cancel the overwriting operation.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-02-15 23:15:29 +11:00 committed by Alexandre Julliard
parent 9cd67d2a5e
commit e0492b27ac
1 changed files with 1 additions and 0 deletions

View File

@ -352,6 +352,7 @@ static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
{
if (!ask_confirm(STRING_OVERWRITE_VALUE, value_name))
{
RegCloseKey(subkey);
output_message(STRING_CANCELLED);
return 0;
}