From: Johannes Berg Date: Tue, 24 Nov 2015 14:38:43 +0000 (+0100) Subject: mac80211: properly free skb when r-o-c for TX fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86c7ec9eb154020797c39e1cc7dafa92da02f603;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mac80211: properly free skb when r-o-c for TX fails When freeing the TX skb for an off-channel TX, use the correct API to also free the ACK skb that might have been allocated. Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 1df92fed74c2..6bcdbab65a8c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3474,7 +3474,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, params->wait, cookie, skb, IEEE80211_ROC_TYPE_MGMT_TX); if (ret) - kfree_skb(skb); + ieee80211_free_txskb(&local->hw, skb); out_unlock: mutex_unlock(&local->mtx); return ret;