зеркало из https://github.com/microsoft/git.git
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:
Родитель
bc57ba1d54
Коммит
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче