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

USB: whiteheat: fix memory leak in error path

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

Cc: <support@connecttech.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ee44fbe
......@@ -333,6 +333,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