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>

Johannes Schindelin committed Oct 21, 2016 at 14:25 UTC 452202c74b8af68de054d30643dd74d8fc606d62
1 file changed +1 -1
sequencer.c
+1 -1
@@ -243,7 +243,6 @@ static int write_message(struct strbuf *msgbuf, const char *filename)
243 return error_errno(_("Could not lock '%s'"), filename);
244 if (write_in_full(msg_fd, msgbuf->buf, msgbuf->len) < 0)
245 return error_errno(_("Could not write to %s"), filename);
246 - strbuf_release(msgbuf);
246 if (commit_lock_file(&msg_file) < 0)
247 return error(_("Error wrapping up %s."), filename);
248
@@ -759,6 +758,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
758 free_commit_list(common);
759 free_commit_list(remotes);
760 }
761 + strbuf_release(&msgbuf);
762
763 /*
764 * If the merge was clean or if it failed due to conflict, we write