diff options
author | Oliver Neukum <oneukum@suse.de> | 2014-11-20 14:54:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-25 02:21:41 +0100 |
commit | d908f8478a8d18e66c80a12adb27764920c1f1ca (patch) | |
tree | 605e2a4a002df343747c1660c91370188e3530bc /drivers/usb/class | |
parent | Merge 3.18-rc4 into usb-next. (diff) | |
download | linux-d908f8478a8d18e66c80a12adb27764920c1f1ca.tar.xz linux-d908f8478a8d18e66c80a12adb27764920c1f1ca.zip |
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: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index c74fd3a3f657..6c6a5c4cc68c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1473,6 +1473,7 @@ alloc_fail8: &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: |