lkml.org 
[lkml]   [2017]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2017-05-04 21:12    [W:0.067 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site