Skip to content

Commit

Permalink
sequencer: avoid leaking message buffer when refusing to create an em…
Browse files Browse the repository at this point in the history
…pty 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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Jun 6, 2013
1 parent c8d1351 commit 706728a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 706728a

Please sign in to comment.