Commit 31945e40 authored by Johan Hovold's avatar Johan Hovold Committed by Ben Hutchings

USB: whiteheat: fix memory leak in error path

commit c129197c upstream.

Make sure command buffer is deallocated in case of errors during attach.

Cc: <support@connecttech.com>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent e18dbfae
......@@ -576,6 +576,7 @@ static int whiteheat_attach(struct usb_serial *serial)
"%s: please contact support@connecttech.com\n",
serial->type->description);
kfree(result);
kfree(command);
return -ENODEV;
no_command_private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment