1
0
Fork 0

macvtap: correctly free skb during socket destruction

We should use kfree_skb() instead of kfree() to free an skb.

Fixes: 362899b872 ("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>
hifive-unleashed-5.1
Jason Wang 2016-07-19 11:02:59 +08:00 committed by David S. Miller
parent 2186f6eec2
commit 0d7eacbe63
1 changed files with 1 additions and 1 deletions

View File

@ -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)