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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 15 09:41:50 CST 2016


Module: wine
Branch: master
Commit: e0492b27acf1448eb4006aba74194e49303b2fa6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e0492b27acf1448eb4006aba74194e49303b2fa6

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Feb 15 23:15:29 2016 +1100

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

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/reg/reg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 63b518f..cc8cac2 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -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;
                 }




More information about the wine-cvs mailing list