summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-01 20:01:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-04 02:36:35 (GMT)
commit19517fb964f81c1bd3ddd006e0fc0119167d9cb2 (patch)
tree020be69759e8b883a0c90c0e8051955aff24303c /sequencer.c
parente6be8e2f9f87fbd6a4f58ac3cda4558563833088 (diff)
downloadgit-19517fb964f81c1bd3ddd006e0fc0119167d9cb2.zip
git-19517fb964f81c1bd3ddd006e0fc0119167d9cb2.tar.gz
git-19517fb964f81c1bd3ddd006e0fc0119167d9cb2.tar.bz2
sequencer.c: plug leaks in do_pick_commit
Going to leave, we additionally free the author and commit message and make sure to call update_abort_safety_file(). Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 72b4d8e..ae6f2c2 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1772,7 +1772,8 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
res = do_recursive_merge(base, next, base_label, next_label,
&head, &msgbuf, opts);
if (res < 0)
- return res;
+ goto leave;
+
res |= write_message(msgbuf.buf, msgbuf.len,
git_path_merge_msg(), 0);
} else {