Skip to contentSkip to conversation

macvtap: correctly free skb during socket destruction

PATCH Applied Jason Wang 2 participants 2 messages Jul 19, 2016

Subsystems (2)
lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/macvtap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/macvtap.c +1 -1
index 9204d19..a38c0da 100644
@@ -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)
Signature · 1 line
2.7.4