From 86c7ec9eb154020797c39e1cc7dafa92da02f603 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 24 Nov 2015 15:38:43 +0100 Subject: 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 --- net/mac80211/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-59-g8ed1b