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

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -333,6 +333,7 @@ static int whiteheat_attach(struct usb_serial *serial)
		"%s: please contact support@connecttech.com\n",
		"%s: please contact support@connecttech.com\n",
		serial->type->description);
		serial->type->description);
	kfree(result);
	kfree(result);
	kfree(command);
	return -ENODEV;
	return -ENODEV;


no_command_private:
no_command_private: