]> err.no Git - linux-2.6/commitdiff
[IRDA]: mcs7780 needs to free allocated rx buffer.
authorHinko Kocevar <hinko.kocevar@cetrtapot.si>
Sun, 16 Dec 2007 22:08:22 +0000 (14:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Dec 2007 22:08:22 +0000 (14:08 -0800)
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>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/mcs7780.c

index 0b769192d4ce0753c872410c601a1e2eb4849a8e..93916cf33f295604e939d02d2b7a1f0bfef28e66 100644 (file)
@@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev)
        /* 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);