From: Stefan Beller Date: Fri, 1 Jun 2018 20:01:45 +0000 (-0700) Subject: sequencer.c: plug leaks in do_pick_commit X-Git-Tag: v2.19.0-rc0~181^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/19517fb964f81c1bd3ddd006e0fc0119167d9cb2?hp=e6be8e2f9f87fbd6a4f58ac3cda4558563833088 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 Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index 72b4d8ecae..ae6f2c27ec 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 {