git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix config_file file leak.

From
CWChris Wilson <cwilson@vigilantsw.com>
Date
Jul 20, 2011, 13:12 UTC
Message-ID
<20110720131214.GC25822@localhost>
In-Reply-To
<4E25BEDB.6040002@ramsay1.demon.co.uk>
On Tue, Jul 19, 2011 at 06:28:59PM +0100, Ramsay Jones wrote:
Show 12 quoted lines
> 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
Previous: Ramsay Jones
Message 4 of 4 in “Fix config_file file leak.”
  1. Fix config_file file leak.Chris Wilson, Jul 14, 2011
  2. Chris WilsonJul 14, 2011
  3. Ramsay JonesJul 19, 2011
  4. Chris WilsonJul 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.