summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLi RongQing2014-12-19 06:19:35 +0100
committerDavid S. Miller2014-12-19 19:19:45 +0100
commit4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59 (patch)
tree6736c3b45b18f7eba8f24bbf6a3666dd4f51216e /drivers
parentMerge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff)
downloadkernel-qcow2-linux-4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59.tar.gz
kernel-qcow2-linux-4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59.tar.xz
kernel-qcow2-linux-4f2ff8ef9eab32e6bc01c71bb539fc68d0917f59.zip
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')
-rw-r--r--drivers/net/ethernet/sun/sunvnet.c1
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;
}