Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b0f82fc authored by Alexey Klimov's avatar Alexey Klimov Committed by Sasha Levin
Browse files

USB: serial: fix memleak in driver-registration error path



[ Upstream commit 647024a7df36014bbc4479d92d88e6b77c0afcf6 ]

udriver struct allocated by kzalloc() will not be freed
if usb_register() and next calls fail. This patch fixes this
by adding one more step with kfree(udriver) in error path.

Signed-off-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 52b29d10
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