提交 4f2ff8ef 编写于 作者: L Li RongQing 提交者: David S. Miller

sunvnet: fix a memory leak in vnet_handle_offloads

when skb_gso_segment returns error, the original skb should be freed
Signed-off-by: NLi RongQing <roy.qing.li@gmail.com>
Acked-by: NDavid L Stevens <david.stevens@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d790be38
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册