Commit 9faa23f8 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: genelink_tx_fixup fails to check for memory allocation failure

this can oops.

  - check for mem alloc failure
parent 8cc113a1
...@@ -986,6 +986,8 @@ genelink_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags) ...@@ -986,6 +986,8 @@ genelink_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
skb2 = skb_copy_expand (skb, (4 + 4*1) , padlen, flags); skb2 = skb_copy_expand (skb, (4 + 4*1) , padlen, flags);
dev_kfree_skb_any (skb); dev_kfree_skb_any (skb);
skb = skb2; skb = skb2;
if (!skb)
return NULL;
} }
// attach the packet count to the header // attach the packet count to the header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment