aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-03-19 06:06:27 -0400
committerLuciano Coelho <coelho@ti.com>2012-04-10 05:42:49 -0400
commit3eba4a0e6db9ca225bc0f3042d60fcfc86a30bc8 (patch)
tree5c8fa54be9f81253a4063b339458cb9a5c5c02dd
parent830be7e021efd3a801ed0113e6a2244020679a13 (diff)
wl12xx: fix a memory leak of probereq template upon recovery
wlvif->probereq is zeroed when adding an interface but the skb pointed to isn't freed when the interface is removed. This would lead to a mem leak on every recovery. Fix it by freeing the skb when removing the interface. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/wl12xx/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index e21d21d7de8e..b560f2d2837b 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2358,6 +2358,8 @@ deinit:
2358 wl1271_free_ap_keys(wl, wlvif); 2358 wl1271_free_ap_keys(wl, wlvif);
2359 } 2359 }
2360 2360
2361 dev_kfree_skb(wlvif->probereq);
2362 wlvif->probereq = NULL;
2361 wl12xx_tx_reset_wlvif(wl, wlvif); 2363 wl12xx_tx_reset_wlvif(wl, wlvif);
2362 if (wl->last_wlvif == wlvif) 2364 if (wl->last_wlvif == wlvif)
2363 wl->last_wlvif = NULL; 2365 wl->last_wlvif = NULL;