Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-11-08 21:17:49 +0300
committerJunio C Hamano <gitster@pobox.com>2022-11-21 06:32:48 +0300
commitd1ec656d68fe6dfc421a5c96d009fbd2e1fa76f3 (patch)
treecd6f8188fa4b24eccb9cb24a82df7d2233bbe21a /builtin/revert.c
parent5ff6e8afac66db0dddb7b12744786e08a293784e (diff)
cherry-pick: free "struct replay_opts" members
Call the release_revisions() function added in 1878b5edc03 (revision.[ch]: provide and start using a release_revisions(), 2022-04-13) in cmd_cherry_pick(), as well as freeing the xmalloc()'d "revs" member itself. This is the same change as the one made for cmd_revert() a few lines above it in fd74ac95ac3 (revert: free "struct replay_opts" members, 2022-07-01). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index ee32c714a7..0f81c8a795 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -261,6 +261,9 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
opts.action = REPLAY_PICK;
sequencer_init_config(&opts);
res = run_sequencer(argc, argv, &opts);
+ if (opts.revs)
+ release_revisions(opts.revs);
+ free(opts.revs);
if (res < 0)
die(_("cherry-pick failed"));
return res;