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>
Stefan Beller committed
Jun 1, 2018 at 13:01 UTC
19517fb964f81c1bd3ddd006e0fc0119167d9cb2
1 file changed
+2
-1
sequencer.c
+2
-1
@@ -1772,7 +1772,8 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
1772
res = do_recursive_merge(base, next, base_label, next_label,
1773
&head, &msgbuf, opts);
1774
if (res < 0)
1775
- return res;
1775
+ goto leave;
1776
+
1777
res |= write_message(msgbuf.buf, msgbuf.len,
1778
git_path_merge_msg(), 0);
1779
} else {