提交 0ff80434 编写于 作者: H Hinko Kocevar 提交者: David S. Miller

[IRDA]: mcs7780 needs to free allocated rx buffer.

While testing the mcs7780 based IrDA USB dongle I've stumbled upon
memory leak in mcs_net_close(). Patch below fixes it.
Signed-off-by: NHinko Kocevar <hinko.kocevar@cetrtapot.si>
Signed-off-by: NSamuel Ortiz <samuel@sortiz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 497ba7f4
...@@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev) ...@@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev)
/* Stop transmit processing */ /* Stop transmit processing */
netif_stop_queue(netdev); netif_stop_queue(netdev);
kfree_skb(mcs->rx_buff.skb);
/* kill and free the receive and transmit URBs */ /* kill and free the receive and transmit URBs */
usb_kill_urb(mcs->rx_urb); usb_kill_urb(mcs->rx_urb);
usb_free_urb(mcs->rx_urb); usb_free_urb(mcs->rx_urb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册