can: kvaser_usb: Avoid double free on URB submission failures
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Thu, 26 Feb 2015 15:20:11 +0000 (10:20 -0500)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 9 Mar 2015 09:22:24 +0000 (10:22 +0100)
commitdeb2701cf704a2fd03a8b598bf73df3edb08818d
treea0481cbc08a3c1ac2ec0eb400b06207dffa9b39b
parentb0d4724b8e4ce2a60ee4e097ec50c3759ec2090a
can: kvaser_usb: Avoid double free on URB submission failures

Upon a URB submission failure, the driver calls usb_free_urb()
but then manually frees the URB buffer by itself.  Meanwhile
usb_free_urb() has alredy freed out that transfer buffer since
we're the only code path holding a reference to this URB.

Remove two of such invalid manual free().

Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c