USB: serial: garmin_gps: fix memory leak on failed URB submit
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:41 +0000 (16:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Jun 2017 22:46:51 +0000 (00:46 +0200)
commita5d48a129a29778692437f1eaf31e34ed89a6838
treede817e12c1a5c01fdd9bb64b1ae84e30c57505ac
parente3c79a80513f5797daca87fa1415c73366b6378a
USB: serial: garmin_gps: fix memory leak on failed URB submit

commit c4ac4496e835b78a45dfbf74f6173932217e4116 upstream.

Make sure to free the URB transfer buffer in case submission fails (e.g.
due to a disconnect).

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/serial/garmin_gps.c