From: Felipe Contreras Date: Thu, 6 Jun 2013 08:58:57 +0000 (-0500) Subject: sequencer: avoid leaking message buffer when refusing to create an empty commit X-Git-Tag: v1.8.3.3~5^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/706728a37c53c3d1c3fc38aa9c9842060d03e9cc sequencer: avoid leaking message buffer when refusing to create an empty commit We should free objects before leaving. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index b4989ba2c3..f7be7d8be6 100644 --- a/sequencer.c +++ b/sequencer.c @@ -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);