diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-01-25 13:14:24 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2022-01-27 08:20:39 +0100 |
commit | 621b24b09eb61c63f262da0c9c5f0e93348897e5 (patch) | |
tree | 5c9e57fb4bd4fab3860de63c5978c0a211cd6d77 /drivers/net/ieee802154/ca8210.c | |
parent | net: ieee802154: at86rf230: Stop leaking skb's (diff) | |
download | linux-621b24b09eb61c63f262da0c9c5f0e93348897e5.tar.xz linux-621b24b09eb61c63f262da0c9c5f0e93348897e5.zip |
net: ieee802154: ca8210: Stop leaking skb's
Upon error the ieee802154_xmit_complete() helper is not called. Only
ieee802154_wake_queue() is called manually. We then leak the skb
structure.
Free the skb structure upon error before returning.
Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220125121426.848337-5-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'drivers/net/ieee802154/ca8210.c')
-rw-r--r-- | drivers/net/ieee802154/ca8210.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index ece6ff6049f6..f3438d3e104a 100644 --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -1771,6 +1771,7 @@ static int ca8210_async_xmit_complete( status ); if (status != MAC_TRANSACTION_OVERFLOW) { + dev_kfree_skb_any(priv->tx_skb); ieee802154_wake_queue(priv->hw); return 0; } |