git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <cwilson@vigilantsw.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix config_file file leak.
Date: Wed, 20 Jul 2011 09:12:14 -0400	[thread overview]
Message-ID: <20110720131214.GC25822@localhost> (raw)
In-Reply-To: <4E25BEDB.6040002@ramsay1.demon.co.uk>

On Tue, Jul 19, 2011 at 06:28:59PM +0100, Ramsay Jones wrote:
> Chris Wilson wrote:
> > Hi,
> > 
> > We are using Sentry (a C/C++ static analysis tool) to analyze
> > git on a nightly basis. Sentry found that a file leak
> > was recently introduced in the commit 924aaf3.
> 
> Hmmm ..., commit 924aaf3 did *not* introduce a file handle leak.
> It would seem that the change in scope of the file handle made it
> easier for Sentry to see the *existing* (potential) file handle leak.
> 
> no?

Ah yes, that does seem like that case. Thanks for pointing that out.

> Other than that, ...

Looks like this file handle will leak whenever a write fails.

Chris

      reply	other threads:[~2011-07-20 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 18:19 [PATCH] Fix config_file file leak Chris Wilson
2011-07-14 18:29 ` Chris Wilson
2011-07-19 17:28 ` Ramsay Jones
2011-07-20 13:12   ` Chris Wilson [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=20110720131214.GC25822@localhost \
    --to=cwilson@vigilantsw.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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).