Subject: [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer

From: Samuel Ortiz <[email-masked]>
Date: Mon, 03 Dec 2007 10:28:33 +0100

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 <[email-masked]>
Signed-off-by: Samuel Ortiz <[email-masked]>

---
 drivers/net/irda/mcs7780.c |    2 ++
 1 file changed, 2 insertions(+)

Index: net-2.6/drivers/net/irda/mcs7780.c
===================================================================
--- net-2.6.orig/drivers/net/irda/mcs7780.c	2007-11-25 05:53:43.000000000 +0100
+++ net-2.6/drivers/net/irda/mcs7780.c	2007-11-25 07:12:11.000000000 +0100
@@ -677,6 +677,8 @@
 	/* 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);

--