Thread (8 messages) 8 messages, 5 authors, 2010-01-06

Re: [PATCH 2/2] NET: wireless, fix memory leak

flat view

From: Jiri Slaby <hidden>
Date: 2010-01-06 19:14:31
Also in: lkml

On 01/06/2010 08:07 PM, Gertjan van Wingerde wrote:
On 01/06/10 17:35, Jiri Slaby wrote:
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help