hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
Although it rarely happens, we should call free_capabilities() if error happens after read_capabilities() to free allocated strings. Fixes: de584afa ("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.comSigned-off-by: Guenter Roeck <linux@roeck-us.net>
Showing
Please register or sign in to comment