Skip to content
Commit f2924d4b authored by Romain Izard's avatar Romain Izard Committed by Greg Kroah-Hartman
Browse files

usb: cdc_acm: Do not leak URB buffers



When the ACM TTY port is disconnected, the URBs it uses must be killed, and
then the buffers must be freed. Unfortunately a previous refactor removed
the code freeing the buffers because it looked extremely similar to the
code killing the URBs.

As a result, there were many new leaks for each plug/unplug cycle of a
CDC-ACM device, that were detected by kmemleak.

Restore the missing code, and the memory leak is removed.

Fixes: ba8c931d ("cdc-acm: refactor killing urbs")
Signed-off-by: default avatarRomain Izard <romain.izard.pro@gmail.com>
Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcb44ac0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment