From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Ortiz Subject: [PATCH 2/5] [IrDA] mcs7780 needs to free allocated rx buffer Date: Mon, 17 Dec 2007 00:46:50 +0100 Message-ID: <20071216234933.121032143@sortiz.org> References: <20071216234648.774780960@sortiz.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "David S. Miller" Return-path: Content-Disposition: inline; filename=mcs7780-free-rx_buff.diff List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: irda-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: irda-users-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: netdev.vger.kernel.org While testing the mcs7780 based IrDA USB dongle I've stumbled upon memory leak in mcs_net_close(). Patch below fixes it. From: Hinko Kocevar Signed-off-by: Hinko Kocevar Signed-off-by: Samuel Ortiz --- 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); -- ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace