OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:46 +0000 (11:22 +0100)
commitf0bdd7e0ccb22ed791402102c04e47b90b407d0a
tree5c2555cbbfe77993d559b0da703ba8cd61db6f95
parente3d6a0da47e6f3610eb002304230c6af97aeb636
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/garmin_gps.c