Code

Merge branch 'maint-1.6.2' into maint-1.6.3
[git.git] / builtin-commit.c
index 0871ad5d66ea07361e263a1c2c38554d72e5af1a..0e72a5657a52d3e3be2aae10993a30784607a896 100644 (file)
@@ -701,7 +701,11 @@ static int parse_and_validate_options(int argc, const char *argv[],
 
        argc = parse_options(argc, argv, builtin_commit_options, usage, 0);
        logfile = parse_options_fix_filename(prefix, logfile);
+       if (logfile)
+               logfile = xstrdup(logfile);
        template_file = parse_options_fix_filename(prefix, template_file);
+       if (template_file)
+               template_file = xstrdup(template_file);
 
        if (force_author && !strchr(force_author, '>'))
                force_author = find_author_by_nickname(force_author);