diff options
author | Oliver Neukum <oneukum@suse.de> | 2014-11-20 14:54:35 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-01-26 14:38:58 +0100 |
commit | b38841c614577800be3d9018f6455a8ee96d8855 (patch) | |
tree | 5d9c20ad83479ba4b35416df68cbf2d58b0660cb /drivers/usb/class/cdc-acm.c | |
parent | faabc4f5c3b94993ca781a03ead160bf5248c7db (diff) |
cdc-acm: memory leak in error case
commit d908f8478a8d18e66c80a12adb27764920c1f1ca upstream.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-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 f578a5aa02c0..2574b24d70c0 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1358,6 +1358,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: |