USB: serial: garmin_gps: fix memory leak on probe errors
authorJohan Hovold <johan@kernel.org>
Wed, 11 Oct 2017 12:02:58 +0000 (14:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:49:22 +0000 (09:49 +0100)
commit3a5a567333df30aa99890a16b9686efcf3442a09
tree3f57dc9f268736186199f610ceb7847a99d3ccac
parentdf2ca939fed4e17d9d260b28420952e10a4615da
USB: serial: garmin_gps: fix memory leak on probe errors

commit 74d471b598444b7f2d964930f7234779c80960a0 upstream.

Make sure to free the port private data before returning after a failed
probe attempt.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/garmin_gps.c