Subject: Re: [PATCH] Fix config_file file leak.

From: Chris Wilson <[email-masked]>
Date: Wed, 20 Jul 2011 09:12:14 -0400

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