diff options
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r-- | parse-options-cb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c index 2d875202cd..16818830e9 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -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); |