提交 0bd193d6 编写于 作者: M Maksim Salau 提交者: Greg Kroah-Hartman

usb: misc: legousbtower: Fix memory leak

get_version_reply is not freed if function returns with success.

Fixes: 942a4873 ("usb: misc: legousbtower: Fix buffers on stack")
Reported-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: NMaksim Salau <maksim.salau@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2f964780
......@@ -926,6 +926,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
USB_MAJOR, dev->minor);
exit:
kfree(get_version_reply);
return retval;
error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册