mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mcs7780 needs to free allocated rx buffer
@ 2007-10-12 12:36 hinko.kocevar
  2007-10-13  0:59 ` [irda-users] " Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: hinko.kocevar @ 2007-10-12 12:36 UTC (permalink / raw)
  To: irda-users; +Cc: Samuel Ortiz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

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

----



[-- Attachment #2: mcs7780-free-rx_buff.diff --]
[-- Type: text/plain, Size: 432 bytes --]

--- 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-13  1:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-12 12:36 [PATCH] mcs7780 needs to free allocated rx buffer hinko.kocevar
2007-10-13  0:59 ` [irda-users] " Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®