aboutsummaryrefslogtreecommitdiffstats
path: root/common/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/init.c')
-rw-r--r--common/init.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/init.c b/common/init.c
index 06fd30956..ba20cd8d0 100644
--- a/common/init.c
+++ b/common/init.c
@@ -318,7 +318,7 @@ prepare_w32_commandline (int *r_argc, char ***r_argv)
int argc;
char **argv;
const char *s;
- int globing;
+ int i, globing, itemsalloced;
s = gpgrt_strusage (95);
globing = (s && *s == '1');
@@ -349,13 +349,18 @@ prepare_w32_commandline (int *r_argc, char ***r_argv)
}
gpgrt_annotate_leaked_object (cmdline);
- argv = w32_parse_commandline (cmdline, globing, &argc);
+ argv = w32_parse_commandline (cmdline, globing, &argc, &itemsalloced);
if (!argv)
{
log_error ("parsing command line failed: %s\n", "internal error");
return; /* Ooops. */
}
gpgrt_annotate_leaked_object (argv);
+ if (itemsalloced)
+ {
+ for (i=0; i < argc; i++)
+ gpgrt_annotate_leaked_object (argv[i]);
+ }
*r_argv = argv;
*r_argc = argc;
}