]> git.ipfire.org Git - thirdparty/git.git/blobdiff - parse-options.c
prefix_filename: return newly allocated string
[thirdparty/git.git] / parse-options.c
index ba6cc30b26aebdcd1a9a14b6e7a2ad4a481ab128..a23a1e67f04f8072bea357cbed34fdc1b39ab7ae 100644 (file)
@@ -40,7 +40,7 @@ static void fix_filename(const char *prefix, const char **file)
        if (!file || !*file || !prefix || is_absolute_path(*file)
            || !strcmp("-", *file))
                return;
-       *file = xstrdup(prefix_filename(prefix, *file));
+       *file = prefix_filename(prefix, *file);
 }
 
 static int opt_command_mode_error(const struct option *opt,