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

Commit d908f847 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

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: default avatarAhmed Tamrawi <ahmedtamrawi@gmail.com>
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
CC: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69b7290e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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: