diff options
Diffstat (limited to 'builtin/revert.c')
| -rw-r--r-- | builtin/revert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index 6a9b550a61..77d2035616 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -221,6 +221,7 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) opts->strategy = xstrdup_or_null(opts->strategy); if (!opts->strategy && getenv("GIT_TEST_MERGE_ALGORITHM")) opts->strategy = xstrdup(getenv("GIT_TEST_MERGE_ALGORITHM")); + free(options); if (cmd == 'q') { int ret = sequencer_remove_state(opts); @@ -247,9 +248,7 @@ int cmd_revert(int argc, const char **argv, const char *prefix) res = run_sequencer(argc, argv, &opts); if (res < 0) die(_("revert failed")); - if (opts.revs) - release_revisions(opts.revs); - free(opts.revs); + replay_opts_release(&opts); return res; } @@ -263,5 +262,6 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix) res = run_sequencer(argc, argv, &opts); if (res < 0) die(_("cherry-pick failed")); + replay_opts_release(&opts); return res; } |
