Skip to content

Commit

Permalink
ieee802154: dont leak skbs in ieee802154_fake_xmit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 19, 2009
1 parent 66b00a7 commit 56cf548
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/ieee802154/fakehard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 56cf548

Please sign in to comment.