diff options
author | Jason Wang <jasowang@redhat.com> | 2016-07-19 05:02:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-19 07:11:22 +0200 |
commit | 0d7eacbe637952fc737a968bc16db1f2ccbbe71c (patch) | |
tree | bae9ec84351a22aafda64962dd5ef90659cee9f2 /drivers/net/macvtap.c | |
parent | net: ethernet: marvell: pxa168_eth: use phy_ethtool_{get|set}_link_ksettings (diff) | |
download | linux-0d7eacbe637952fc737a968bc16db1f2ccbbe71c.tar.xz linux-0d7eacbe637952fc737a968bc16db1f2ccbbe71c.zip |
macvtap: correctly free skb during socket destruction
We should use kfree_skb() instead of kfree() to free an skb.
Fixes: 362899b8725b ("macvtap: switch to use skb array")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r-- | drivers/net/macvtap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 9204d19fb30c..a38c0dac514b 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -536,7 +536,7 @@ static void macvtap_sock_destruct(struct sock *sk) struct sk_buff *skb; while ((skb = skb_array_consume(&q->skb_array)) != NULL) - kfree(skb); + kfree_skb(skb); } static int macvtap_open(struct inode *inode, struct file *file) |