rt2x00: Fix memleak when RTS/CTS fails
When sending the RTS/CTS frame fails, we should free the skb buffer which was created. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
5adf6d63c1
commit
e7087a828f
|
@ -83,6 +83,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
|
|||
(struct ieee80211_rts *)(skb->data));
|
||||
|
||||
if (rt2x00queue_write_tx_frame(queue, skb)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n");
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue