Skip to contentSkip to conversation

mcs7780 needs to free allocated rx buffer

PATCH In review [email protected] 2 participants 2 messages Oct 12, 2007 – Oct 13, 2007 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mcs7780 needs to free allocated rx buffer

Hi,

While testing the mcs7780 based IrDA USB dongle I've stumbled upon memory leak in mcs_net_close(). Patch below fixes it.

Best regards,
Hinko

----

drivers/net/irda/mcs7780.c renamed from drivers/net/irda/mcs7780.c.orig +2 -0
@@ -678,6 +678,8 @@ static int mcs_net_close(struct net_devi
 	/* 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);
#1 lore raw

Hi Hinko,

Quoted 4 lines · On Fri, Oct 12, 2007 at 02:36:46PM +0200, [email protected] wrote:

Hi,

While testing the mcs7780 based IrDA USB dongle I've stumbled upon memory leak in mcs_net_close(). Patch below fixes it.

Thanks for the fix. Applied to my local git, will push forward.

Cheers,
Samuel.

Quoted 30 lines

Best regards,
Hinko

----

drivers/net/irda/mcs7780.c renamed from drivers/net/irda/mcs7780.c.orig +2 -1
@@ -678,6 +678,8 @@ static int mcs_net_close(struct net_devi
 	/* 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);
 
-------------------------------------------------------------------------

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
irda-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/irda-users