Hugh McMaster : regedit: Process registry input from stdin.
Alexandre Julliard
julliard at winehq.org
Mon Aug 29 11:07:23 CDT 2016
Module: wine
Branch: master
Commit: d8fd4bde382f7bba9d876dab6275e9706b7e3c5e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8fd4bde382f7bba9d876dab6275e9706b7e3c5e
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Mon Aug 29 12:06:08 2016 +0000
regedit: Process registry input from stdin.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/regedit/regedit.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
index c0a1eab..7b2ddaef 100644
--- a/programs/regedit/regedit.c
+++ b/programs/regedit/regedit.c
@@ -93,6 +93,7 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
case ACTION_ADD: {
WCHAR *filename = argv[*i];
WCHAR hyphen[] = {'-',0};
+ WCHAR *realname = NULL;
FILE *reg_file;
if (!strcmpW(filename, hyphen))
@@ -100,7 +101,6 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
else
{
int size;
- WCHAR *realname = NULL;
WCHAR rb_mode[] = {'r','b',0};
size = SearchPathW(NULL, filename, NULL, 0, NULL, NULL);
@@ -124,12 +124,12 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i)
HeapFree(GetProcessHeap(), 0, realname);
return;
}
- import_registry_file(reg_file);
- if (realname)
- {
- HeapFree(GetProcessHeap(),0,realname);
- fclose(reg_file);
- }
+ }
+ import_registry_file(reg_file);
+ if (realname)
+ {
+ HeapFree(GetProcessHeap(), 0, realname);
+ fclose(reg_file);
}
break;
}
More information about the wine-cvs
mailing list