mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
revert: free "struct replay_opts" members
Call the release_revisions() function added in
1878b5edc0
(revision.[ch]: provide and start using a
release_revisions(), 2022-04-13) in cmd_revert(), as well as freeing
the xmalloc()'d "revs" member itself.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
bc57ba1d54
commit
fd74ac95ac
|
@ -246,6 +246,9 @@ 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);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue