This is a note to let you know that I've just added the patch titled

    hwmon: (sht15) Fix memory leak if regulator_enable() fails

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From li...@roeck-us.net  Mon Mar 18 12:40:31 2013
From: Guenter Roeck <li...@roeck-us.net>
Date: Sat, 16 Mar 2013 06:32:16 -0700
Subject: hwmon: (sht15) Fix memory leak if regulator_enable() fails
To: stable@vger.kernel.org
Cc: Ben Hutchings <b...@decadent.org.uk>, Guenter Roeck <li...@roeck-us.net>
Message-ID: <1363440736-14964-1-git-send-email-li...@roeck-us.net>

From: Ben Hutchings <b...@decadent.org.uk>

Commit 3e78080f8148 ('hwmon: (sht15) Check return value of
regulator_enable()') depends on the use of devm_kmalloc() for automatic
resource cleanup in the failure cases, which was introduced in 3.7.  In
older stable branches, explicit cleanup is needed.

Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
Signed-off-by: Guenter Roeck <li...@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
Applies to stable branches between 3.0 and 3.6 where commit 3e78080f8148
has been applied.

 drivers/hwmon/sht15.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -930,7 +930,7 @@ static int __devinit sht15_probe(struct
                if (ret != 0) {
                        dev_err(&pdev->dev,
                                "failed to enable regulator: %d\n", ret);
-                       return ret;
+                       goto err_free_data;
                }
 
                /*


Patches currently in stable-queue which might be from li...@roeck-us.net are

queue-3.4/hwmon-pmbus-ltc2978-fix-temperature-reporting.patch
queue-3.4/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch
queue-3.4/hwmon-lineage-pem-add-missing-terminating-entry-for-pem__attributes.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to