Patch "hwmon: (sht15) Fix memory leak if regulator_enable() fails" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> know about it.


>From linux@xxxxxxxxxxxx  Mon Mar 18 12:40:31 2013
From: Guenter Roeck <linux@xxxxxxxxxxxx>
Date: Sat, 16 Mar 2013 06:32:16 -0700
Subject: hwmon: (sht15) Fix memory leak if regulator_enable() fails
To: stable@xxxxxxxxxxxxxxx
Cc: Ben Hutchings <ben@xxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>
Message-ID: <1363440736-14964-1-git-send-email-linux@xxxxxxxxxxxx>

From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>

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 <ben@xxxxxxxxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
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 linux@xxxxxxxxxxxx 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]