[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170504221101.094c5061@h01rn72.ncal.norcal.wdc.com>
Date: Thu, 4 May 2017 22:11:23 +0300
From: Maksim Salau <maksim.salau@...il.com>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Juergen Stuber <starblue@...rs.sourceforge.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
legousb-devel@...ts.sourceforge.net, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alfredo Rafael Vicente Boix <alviboi@...il.com>
Subject: Re: [PATCH v3] usb: misc: legousbtower: Fix buffers on stack
> > @@ -913,6 +929,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
>
> Don't you need to free get_version_reply here?
>
> > return retval;
> >
> > error:
> > + kfree(get_version_reply);
> > tower_delete(dev);
> > return retval;
> > }
Thank you very much, Heikki!
I was so focused on failure cases, that missed memory leak in the case
when all calls succeeded.
I'll prepare a patch shortly to fix this.
Regards,
Maksim.
Powered by blists - more mailing lists