[3.13.y-ckt stable] Patch "cdc-acm: memory leak in error case" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Wed Jan 28 22:19:52 UTC 2015
This is a note to let you know that I have just added a patch titled
cdc-acm: memory leak in error case
to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11-ckt15.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From d448f09bf49e4489fef03a97d0e821d1c07bb257 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum at suse.de>
Date: Thu, 20 Nov 2014 14:54:35 +0100
Subject: 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 at gmail.com>
Signed-off-by: Oliver Neukum <oneukum at suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/usb/class/cdc-acm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 4c43b31..8a236bf 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1326,6 +1326,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:
--
1.9.1
More information about the kernel-team
mailing list