diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-20 05:44:38 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-11-04 23:47:20 +0300 |
commit | fb5be6a7b4863ecc44963bb80ca614584b6c7817 (patch) | |
tree | bda3705945340f42c209771ad76652ba9e8e965e /drivers | |
parent | db9ee384f6f71f7c5296ce85b7c1a2a2527e7c72 (diff) | |
download | linux-fb5be6a7b4863ecc44963bb80ca614584b6c7817.tar.xz |
can: gs_usb: gs_can_open(): prevent memory leak
In gs_can_open() if usb_submit_urb() fails the allocated urb should be
released.
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/usb/gs_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index bd6eb9967630..2f74f6704c12 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -623,6 +623,7 @@ static int gs_can_open(struct net_device *netdev) rc); usb_unanchor_urb(urb); + usb_free_urb(urb); break; } |