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>
This commit is contained in:
parent
2186f6eec2
commit
0d7eacbe63
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue