lkml.org 
[lkml]   [2007]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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.

Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>

Best regards,
Hinko

----


--- linux-2.6.23/drivers/net/irda/mcs7780.c.orig 2007-10-12 14:02:55.000000000 +0200
+++ linux-2.6.23/drivers/net/irda/mcs7780.c 2007-10-12 14:05:03.000000000 +0200
@@ -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);
\
 
 \ /
  Last update: 2007-10-12 15:05    [W:0.033 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site