sequencer: plug memory leaks for the option values
[gitweb.git] / builtin / revert.c
index 7365559c97aa12181d675180ac8785efe9af967b..ba5a88cbfd279cc6a408045d8e205d3c68fa9f7c 100644 (file)
@@ -174,6 +174,10 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
 
        if (argc > 1)
                usage_with_options(usage_str, options);
+
+       /* These option values will be free()d */
+       opts->gpg_sign = xstrdup_or_null(opts->gpg_sign);
+       opts->strategy = xstrdup_or_null(opts->strategy);
 }
 
 int cmd_revert(int argc, const char **argv, const char *prefix)