mac80211: properly free skb when r-o-c for TX fails
authorJohannes Berg <johannes.berg@intel.com>
Tue, 24 Nov 2015 14:38:43 +0000 (15:38 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 4 Dec 2015 13:43:32 +0000 (14:43 +0100)
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 <johannes.berg@intel.com>
net/mac80211/cfg.c

index 1df92fe..6bcdbab 100644 (file)
@@ -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;