diff options
author | Bjorn Van Tilt <bjorn.vantilt@gmail.com> | 2014-03-24 15:32:08 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-04-01 11:54:55 +0200 |
commit | 636d0375e7a850c95a0abc2c214295ce06cd2ab4 (patch) | |
tree | b45e7d045ac4cf696d8bcc292ea79d568e6523e0 /drivers/net | |
parent | at86rf230: mask irq's before deregister device (diff) | |
download | linux-636d0375e7a850c95a0abc2c214295ce06cd2ab4.tar.xz linux-636d0375e7a850c95a0abc2c214295ce06cd2ab4.zip |
can: usb_8dev: Fix memory leak in usb_8dev_start_xmit
Fixed a memory leak when an error occurred in the transmit function. In the
error handling the urb wasn't freed before returning. There was also a call to
the usb_unanchor_urb() function but the urb wasn't anchored.
Signed-off-by: Bjorn Van Tilt <bjorn.vantilt@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/usb/usb_8dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index a0fa1fd5092b..e7247a506586 100644 --- a/drivers/net/can/usb/usb_8dev.c +++ b/drivers/net/can/usb/usb_8dev.c @@ -697,8 +697,8 @@ static netdev_tx_t usb_8dev_start_xmit(struct sk_buff *skb, return NETDEV_TX_OK; nofreecontext: - usb_unanchor_urb(urb); usb_free_coherent(priv->udev, size, buf, urb->transfer_dma); + usb_free_urb(urb); netdev_warn(netdev, "couldn't find free context"); |