提交 d908f847 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

cdc-acm: memory leak in error case

If probe() fails not only the attributes need to be removed
but also the memory freed.
Reported-by: NAhmed Tamrawi <ahmedtamrawi@gmail.com>
Signed-off-by: NOliver Neukum <oneukum@suse.de>
CC: stable@vger.kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 69b7290e
......@@ -1473,6 +1473,7 @@ static int acm_probe(struct usb_interface *intf,
&dev_attr_wCountryCodes);
device_remove_file(&acm->control->dev,
&dev_attr_iCountryCodeRelDate);
kfree(acm->country_codes);
}
device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities);
alloc_fail7:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册