Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7087a82 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

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: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5adf6d63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}