Re: [PATCH] USB: serial: fix memleak on error path in usb-serial

From: Johan Hovold
Date: Mon Aug 08 2016 - 07:48:17 EST


On Mon, Aug 08, 2016 at 02:34:46AM +0100, Alexey Klimov wrote:
> 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.
>
> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Alexey Klimov <klimov.linux@xxxxxxxxx>

Now applied, thanks.

Johan