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:
parent
c8d1351deb
commit
706728a37c
@ -628,8 +628,10 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
|
|||||||
}
|
}
|
||||||
|
|
||||||
allow = allow_empty(opts, commit);
|
allow = allow_empty(opts, commit);
|
||||||
if (allow < 0)
|
if (allow < 0) {
|
||||||
return allow;
|
res = allow;
|
||||||
|
goto leave;
|
||||||
|
}
|
||||||
if (!opts->no_commit)
|
if (!opts->no_commit)
|
||||||
res = run_git_commit(defmsg, opts, allow);
|
res = run_git_commit(defmsg, opts, allow);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user