Skip to content
Commit c3b26fdf authored by Linyu Yuan's avatar Linyu Yuan Committed by David S. Miller
Browse files

net: cdc_eem: fix tx fixup skb leak



when usbnet transmit a skb, eem fixup it in eem_tx_fixup(),
if skb_copy_expand() failed, it return NULL,
usbnet_start_xmit() will have no chance to free original skb.

fix it by free orginal skb in eem_tx_fixup() first,
then check skb clone status, if failed, return NULL to usbnet.

Fixes: 9f722c09 ("usbnet: CDC EEM support (v5)")
Signed-off-by: default avatarLinyu Yuan <linyyuan@codeaurora.org>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc39f679
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