projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dca011
)
USB: serial: garmin_gps: fix memory leak on failed URB submit
author
Johan Hovold
<johan@kernel.org>
Tue, 3 Jan 2017 15:39:41 +0000
(16:39 +0100)
committer
Johan Hovold
<johan@kernel.org>
Wed, 4 Jan 2017 09:37:15 +0000
(10:37 +0100)
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")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/garmin_gps.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/serial/garmin_gps.c
b/drivers/usb/serial/garmin_gps.c
index 97cabf803c2fa91a134c957dba74c4f77b97c712..b2f2e87aed945d7aceac24c99cf2f7c401beb5b2 100644
(file)
--- a/
drivers/usb/serial/garmin_gps.c
+++ b/
drivers/usb/serial/garmin_gps.c
@@
-1043,6
+1043,7
@@
static int garmin_write_bulk(struct usb_serial_port *port,
"%s - usb_submit_urb(write bulk) failed with status = %d\n",
__func__, status);
count = status;
+ kfree(buffer);
}
/* we are done with this urb, so let the host driver