Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eba4a0e authored by Eyal Shapira's avatar Eyal Shapira Committed by Luciano Coelho
Browse files

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: default avatarEyal Shapira <eyal@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 830be7e0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;