From: Chris Wilson Date: Wed, 20 Jul 2011 13:12:14 GMT Subject: Re: [PATCH] Fix config_file file leak. 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: > 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