From: Jonathan Nieder <jrnieder@gmail.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] merge: release strbuf after use in suggest_conflicts()
Date: Tue, 23 Dec 2014 18:11:55 -0800 [thread overview]
Message-ID: <20141224021155.GD29365@google.com> (raw)
In-Reply-To: <549A065E.8060008@web.de>
René Scharfe wrote:
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> builtin/merge.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/builtin/merge.c b/builtin/merge.c
> index 215d485..d722889 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -894,6 +894,7 @@ static int suggest_conflicts(void)
>
> append_conflicts_hint(&msgbuf);
> fputs(msgbuf.buf, fp);
> + strbuf_release(&msgbuf);
> fclose(fp);
> rerere(allow_rerere_auto);
> printf(_("Automatic merge failed; "
The caller is about to exit so this is a small one-time leak, but
freeing it doesn't cost much and makes analysis by valgrind
a little easier. So this seems like a good change.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
prev parent reply other threads:[~2014-12-24 2:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 0:18 [PATCH] merge: release strbuf after use in suggest_conflicts() René Scharfe
2014-12-24 2:11 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141224021155.GD29365@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).