diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-10-21 14:25:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-21 18:32:35 +0200 |
commit | 452202c74b8af68de054d30643dd74d8fc606d62 (patch) | |
tree | c2a7cffb020518dbec5c60565f3f9a5997eaca4c /sequencer.c | |
parent | sequencer: left-trim lines read from the script (diff) | |
download | git-452202c74b8af68de054d30643dd74d8fc606d62.tar.xz git-452202c74b8af68de054d30643dd74d8fc606d62.zip |
sequencer: stop releasing the strbuf in write_message()
Nothing in the name "write_message()" suggests that the function
releases the strbuf passed to it. So let's release the strbuf in the
caller instead.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index d74fdce99b..745c86f654 100644 --- a/sequencer.c +++ b/sequencer.c @@ -243,7 +243,6 @@ static int write_message(struct strbuf *msgbuf, const char *filename) return error_errno(_("Could not lock '%s'"), filename); if (write_in_full(msg_fd, msgbuf->buf, msgbuf->len) < 0) return error_errno(_("Could not write to %s"), filename); - strbuf_release(msgbuf); if (commit_lock_file(&msg_file) < 0) return error(_("Error wrapping up %s."), filename); @@ -759,6 +758,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit, free_commit_list(common); free_commit_list(remotes); } + strbuf_release(&msgbuf); /* * If the merge was clean or if it failed due to conflict, we write |