diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-07-01 12:42:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-07-01 20:43:42 +0200 |
commit | fd74ac95ac31cefee41cb732255c25d910008fff (patch) | |
tree | 482c6d228b2229a1fe3ab20b09aff1ebba569f22 /builtin | |
parent | submodule.c: free() memory from xgetcwd() (diff) | |
download | git-fd74ac95ac31cefee41cb732255c25d910008fff.tar.xz git-fd74ac95ac31cefee41cb732255c25d910008fff.zip |
revert: 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_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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/revert.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index f84c253f4c..2554f9099c 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -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; } |