vcs-svn: rename repo functions to "svn_repo"
[gitweb.git] / parse-options-cb.c
index 2d875202cd8c8164b6604ea889ee633424fe3b55..16818830e97e099286f3aa259378de1b8e9fc322 100644 (file)
@@ -149,7 +149,7 @@ int parse_opt_string_list(const struct option *opt, const char *arg, int unset)
        if (!arg)
                return -1;
 
-       string_list_append(v, xstrdup(arg));
+       string_list_append(v, arg);
        return 0;
 }
 
@@ -199,8 +199,7 @@ int parse_opt_passthru(const struct option *opt, const char *arg, int unset)
        if (recreate_opt(&sb, opt, arg, unset) < 0)
                return -1;
 
-       if (*opt_value)
-               free(*opt_value);
+       free(*opt_value);
 
        *opt_value = strbuf_detach(&sb, NULL);