cherry-pick: free "struct replay_opts" members
Call the release_revisions() function added in1878b5edc0
(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 infd74ac95ac
(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>
This commit is contained in:
parent
5ff6e8afac
commit
d1ec656d68
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user