]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/8021q/vlan_core.c
virtio: rng: delay hwrng_register() till driver is ready
[karo-tx-linux.git] / net / 8021q / vlan_core.c
index 9012b1c922b61acd28fffb7f50b4968da9293b2f..75d427763992b1b4bb47c782ead2d2300ffb61c3 100644 (file)
@@ -114,8 +114,11 @@ EXPORT_SYMBOL(vlan_dev_vlan_proto);
 
 static struct sk_buff *vlan_reorder_header(struct sk_buff *skb)
 {
-       if (skb_cow(skb, skb_headroom(skb)) < 0)
+       if (skb_cow(skb, skb_headroom(skb)) < 0) {
+               kfree_skb(skb);
                return NULL;
+       }
+
        memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN);
        skb->mac_header += VLAN_HLEN;
        return skb;