lkml.org 
[lkml]   [2019]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [kbuild] [PATCH] usb: sierra: fix a missing check of device_create_file
On Tue, Mar 26, 2019 at 11:18:31AM +0300, Dan Carpenter wrote:
> 32fe5e393 Kevin Lloyd 2008-07-10 193 }
> 32fe5e393 Kevin Lloyd 2008-07-10 194 kfree(swocInfo);
> ^^^^^^^^^^^^^^^^
>
> 32fe5e393 Kevin Lloyd 2008-07-10 195 }
>
> break statement?

Sorry, for some reason I saw "complete:" and read "default:". :/

But the warning seems valid.

regards,
dan carpenter

>
> 32fe5e393 Kevin Lloyd 2008-07-10 196 complete:
> 32fe5e393 Kevin Lloyd 2008-07-10 197 result = device_create_file(&us->pusb_intf->dev, &dev_attr_truinst);
> 04d66f3d0 Kangjie Lu 2019-03-24 198 if (result) {
> 04d66f3d0 Kangjie Lu 2019-03-24 @199 kfree(swocInfo);
> ^^^^^^^^^^^^^^^
> Double free.
>

\
 
 \ /
  Last update: 2019-03-26 09:24    [W:0.063 / U:36.480 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site