lkml.org 
[lkml]   [2010]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] NET: wireless, fix memory leak
On 01/06/2010 08:07 PM, Gertjan van Wingerde wrote:
> On 01/06/10 17:35, Jiri Slaby wrote:
>> @@ -717,6 +717,9 @@ int cfg80211_wext_siwscan(struct net_device *dev,
>> out:
>> cfg80211_unlock_rdev(rdev);
>> return err;
>> +out_free:
>> + kfree(creq);
>> + goto out;
>> }
>> EXPORT_SYMBOL_GPL(cfg80211_wext_siwscan);
>>
>
> This last part looks a bit strange. Why don't you put out_free label before out label,

Because `out' is a part of non-error flow, where the creq should not be
freed.

thanks,
--
js


\
 
 \ /
  Last update: 2010-01-06 20:17    [W:0.044 / U:1.812 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site