diff options
author | Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2020-06-25 13:32:42 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-09 09:35:56 +0200 |
commit | a56fe733f4b7db8d909faa23f82afdd23ea9822f (patch) | |
tree | b682b112f4cf742e5f7c4af37735af1e066e12b5 /net/sched | |
parent | 25c99651712a17cd34da036498691cdf77c80a32 (diff) | |
download | linux-stable-a56fe733f4b7db8d909faa23f82afdd23ea9822f.tar.gz linux-stable-a56fe733f4b7db8d909faa23f82afdd23ea9822f.tar.bz2 linux-stable-a56fe733f4b7db8d909faa23f82afdd23ea9822f.zip |
hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
[ Upstream commit 8b97f9922211c44a739c5cbd9502ecbb9f17f6d1 ]
Although it rarely happens, we should call free_capabilities()
if error happens after read_capabilities() to free allocated strings.
Fixes: de584afa5e188 ("hwmon driver for ACPI 4.0 power meters")
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Link: https://lore.kernel.org/r/20200625043242.31175-1-misono.tomohiro@jp.fujitsu.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions