diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-12-19 08:19:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-19 21:19:45 +0300 |
commit | 4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59 (patch) | |
tree | 6736c3b45b18f7eba8f24bbf6a3666dd4f51216e /drivers/net/ethernet | |
parent | d790be3863b28fd22e0781c1a3ddefcbfd5f7086 (diff) | |
download | linux-4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59.tar.xz |
sunvnet: fix a memory leak in vnet_handle_offloads
when skb_gso_segment returns error, the original skb should be freed
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: David L Stevens <david.stevens@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 45c408ef67d0..d2835bf7b4fb 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -1201,6 +1201,7 @@ static int vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb) segs = skb_gso_segment(skb, dev->features & ~NETIF_F_TSO); if (IS_ERR(segs)) { dev->stats.tx_dropped++; + dev_kfree_skb_any(skb); return NETDEV_TX_OK; } |