projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fef90c
)
can: kvaser_usb: free buf in error paths
author
Jimmy Assarsson
<jimmyassarsson@gmail.com>
Tue, 21 Nov 2017 07:22:26 +0000
(08:22 +0100)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Fri, 1 Dec 2017 10:20:52 +0000
(11:20 +0100)
The allocated buffer was not freed if usb_submit_urb() failed.
Signed-off-by: Jimmy Assarsson <jimmyassarsson@gmail.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/usb/kvaser_usb.c
b/drivers/net/can/usb/kvaser_usb.c
index
9b18d96
..
0756445
100644
(file)
--- a/
drivers/net/can/usb/kvaser_usb.c
+++ b/
drivers/net/can/usb/kvaser_usb.c
@@
-813,6
+813,7
@@
static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
if (err) {
netdev_err(netdev, "Error transmitting URB\n");
usb_unanchor_urb(urb);
+ kfree(buf);
usb_free_urb(urb);
return err;
}
@@
-1768,6
+1769,7
@@
static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
usb_unanchor_urb(urb);
+ kfree(buf);
stats->tx_dropped++;