Commit 56cf5483 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ieee802154: dont leak skbs in ieee802154_fake_xmit()

ieee802154_fake_xmit() should free skbs since it returns NETDEV_TX_OK
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Acked-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66b00a7c
...@@ -260,15 +260,12 @@ static int ieee802154_fake_close(struct net_device *dev) ...@@ -260,15 +260,12 @@ static int ieee802154_fake_close(struct net_device *dev)
static netdev_tx_t ieee802154_fake_xmit(struct sk_buff *skb, static netdev_tx_t ieee802154_fake_xmit(struct sk_buff *skb,
struct net_device *dev) struct net_device *dev)
{ {
skb->iif = dev->ifindex;
skb->dev = dev;
dev->stats.tx_packets++; dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
dev->trans_start = jiffies;
/* FIXME: do hardware work here ... */ /* FIXME: do hardware work here ... */
dev_kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
......
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