1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 11:36:10 +02:00

sequencer: avoid leaking message buffer when refusing to create an empty commit

We should free objects before leaving.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2013-06-06 03:58:57 -05:00 committed by Junio C Hamano
parent c8d1351deb
commit 706728a37c

View File

@ -628,8 +628,10 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
}
allow = allow_empty(opts, commit);
if (allow < 0)
return allow;
if (allow < 0) {
res = allow;
goto leave;
}
if (!opts->no_commit)
res = run_git_commit(defmsg, opts, allow);