Re: [PATCH 2/2] Eliminate double kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 29, 2008 at 05:57:50PM +0200, Julia Lawall wrote:
> On Thu, 29 May 2008, Dmitry Torokhov wrote:
> 
> > Hi Julia,
> > 
> > On Thu, May 29, 2008 at 03:05:07PM +0200, Julia Lawall wrote:
> > > From: Julia Lawall <julia@xxxxxxx>
> > > 
> > > The variable report is only non-NULL and non-freed in a small region of
> > > code, so it should only be freed in error handling code that comes from
> > > that region.
> > > 
> > 
> > Thank you for your patch. There isn't a double-kfree though, as far
> > as I can see.
> 
> There was a double free because the error handling at the end of the 
> function (for input_register_device) would fall through to the 
> kfree(report) under err_free_devs, even though report is already freed at 
> that point.
> 

Ah, yes, indeed.. Well, that decides what branch the patch gets
applied then ;)

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux