mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
ieee802154: dont leak skbs in ieee802154_fake_xmit()
ieee802154_fake_xmit() should free skbs since it returns NETDEV_TX_OK Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
66b00a7c93
commit
56cf54831f
1 changed files with 1 additions and 4 deletions
|
@ -260,15 +260,12 @@ static int ieee802154_fake_close(struct net_device *dev)
|
|||
static netdev_tx_t ieee802154_fake_xmit(struct sk_buff *skb,
|
||||
struct net_device *dev)
|
||||
{
|
||||
skb->iif = dev->ifindex;
|
||||
skb->dev = dev;
|
||||
dev->stats.tx_packets++;
|
||||
dev->stats.tx_bytes += skb->len;
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
/* FIXME: do hardware work here ... */
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue