Skip to content

Commit

Permalink
[IRDA]: mcs7780 needs to free allocated rx buffer.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hinko Kocevar authored and David S. Miller committed Dec 16, 2007
1 parent 497ba7f commit 0ff8043
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/irda/mcs7780.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0ff8043

Please sign in to comment.