Commit a48db008 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: whiteheat: fix memory leak in error path

commit c129197c upstream.

Make sure command buffer is deallocated in case of errors during attach.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Cc: <support@connecttech.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 974ee86a
......@@ -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