summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-10 21:11:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-10 21:11:46 (GMT)
commit7cc5f890882214c12c08067404321043fb93e048 (patch)
tree02980bcc1f20ddfcd0561c6ec896d49a944dc76e
parentb089e5e6cb30a40bd115c2b421552873ebd67c47 (diff)
parentf6b9413bafbe22202007f9c891082c1df82fce52 (diff)
downloadgit-7cc5f890882214c12c08067404321043fb93e048.zip
git-7cc5f890882214c12c08067404321043fb93e048.tar.gz
git-7cc5f890882214c12c08067404321043fb93e048.tar.bz2
Merge branch 'ag/sequencer-continue-leakfix'
Leakfix. * ag/sequencer-continue-leakfix: sequencer: fix a memory leak in sequencer_continue()
-rw-r--r--sequencer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c
index 8a51c90..1bee26e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4356,8 +4356,10 @@ int sequencer_continue(struct repository *r, struct replay_opts *opts)
if (is_rebase_i(opts)) {
if ((res = read_populate_todo(r, &todo_list, opts)))
goto release_todo_list;
- if (commit_staged_changes(r, opts, &todo_list))
- return -1;
+ if (commit_staged_changes(r, opts, &todo_list)) {
+ res = -1;
+ goto release_todo_list;
+ }
} else if (!file_exists(get_todo_path(opts)))
return continue_single_pick(r);
else if ((res = read_populate_todo(r, &todo_list, opts)))