Skip to content

Commit

Permalink
wl12xx: fix a memory leak of probereq template upon recovery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eyal Shapira authored and Luciano Coelho committed Apr 10, 2012
1 parent 830be7e commit 3eba4a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,8 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
wl1271_free_ap_keys(wl, wlvif);
}

dev_kfree_skb(wlvif->probereq);
wlvif->probereq = NULL;
wl12xx_tx_reset_wlvif(wl, wlvif);
if (wl->last_wlvif == wlvif)
wl->last_wlvif = NULL;
Expand Down

0 comments on commit 3eba4a0

Please sign in to comment.