public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "René Scharfe" <l.s.r@web•de>
Cc: Git Mailing List <git@vger•kernel.org>,
	Ronnie Sahlberg <sahlberg@google•com>
Subject: Re: [PATCH] refs: release strbuf after use in check_refname_component()
Date: Mon, 29 Dec 2014 09:37:43 -0800	[thread overview]
Message-ID: <xmqq387y1hnc.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <549A0665.6080207@web.de> ("René Scharfe"'s message of "Wed, 24 Dec 2014 01:18:45 +0100")

René Scharfe <l.s.r@web•de> writes:

> Signed-off-by: Rene Scharfe <l.s.r@web•de>
> ---
>  refs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/refs.c b/refs.c
> index 5fcacc6..ed3b2cb 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -2334,7 +2334,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
>  			struct strbuf err = STRBUF_INIT;
>  			unable_to_lock_message(ref_file, errno, &err);
>  			error("%s", err.buf);
> -			strbuf_reset(&err);
> +			strbuf_release(&err);
>  			goto error_return;
>  		}
>  	}

The subject does not seem to match what the patch is doing, but the
patch is obviously correct ;-)

  reply	other threads:[~2014-12-29 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24  0:18 [PATCH] refs: release strbuf after use in check_refname_component() René Scharfe
2014-12-29 17:37 ` Junio C Hamano [this message]
2014-12-29 21:13   ` Jeff King

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=xmqq387y1hnc.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=l.s.r@web$(echo .)de \
    --cc=sahlberg@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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