Commit b7bc9679 authored by Ben Greear's avatar Ben Greear Committed by Johannes Berg
Browse files

mac80211_hwsim: fix memory leak on netlink TX failure

If the packet can't be delivered to userspace (at all or
quickly enough) then it can leak - fix that.
Signed-off-by: default avatarBen Greear <>
[rewrite commit message]
Signed-off-by: default avatarJohannes Berg <>
parent 35a9ad8a
......@@ -862,7 +862,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
if (skb_queue_len(&data->pending) >= MAX_QUEUE) {
/* Droping until WARN_QUEUE level */
while (skb_queue_len(&data->pending) >= WARN_QUEUE)
ieee80211_free_txskb(hw, skb_dequeue(&data->pending));
......@@ -921,6 +921,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
ieee80211_free_txskb(hw, my_skb);
static bool hwsim_chans_compat(struct ieee80211_channel *c1,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment