From: Hinko Kocevar Date: Sun, 16 Dec 2007 22:08:22 +0000 (-0800) Subject: [IRDA]: mcs7780 needs to free allocated rx buffer. X-Git-Tag: v2.6.24-rc6~67^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0ff804348d66550e7dd1d6781c65403b312e2da2;p=linux-2.6-omap-h63xx.git [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: Hinko Kocevar Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller --- diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index 0b769192d4c..93916cf33f2 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c @@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev) /* Stop transmit processing */ netif_stop_queue(netdev); + kfree_skb(mcs->rx_buff.skb); + /* kill and free the receive and transmit URBs */ usb_kill_urb(mcs->rx_urb); usb_free_urb(mcs->rx_urb);