Skip to content

Commit e48cb5c

Browse files
committed
Merge tag 'thermal-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fix from Rafael Wysocki: "Fix a memory leak in the int340x thermal driver's ACPI notify handler (Chuansheng Liu)" * tag 'thermal-5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: int340x: fix memory leak in int3400_notify()
2 parents 2800b6d + 3abea10 commit e48cb5c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ static void int3400_notify(acpi_handle handle,
404404
thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", therm_event);
405405
thermal_prop[4] = NULL;
406406
kobject_uevent_env(&priv->thermal->device.kobj, KOBJ_CHANGE, thermal_prop);
407+
kfree(thermal_prop[0]);
408+
kfree(thermal_prop[1]);
409+
kfree(thermal_prop[2]);
410+
kfree(thermal_prop[3]);
407411
}
408412

409413
static int int3400_thermal_get_temp(struct thermal_zone_device *thermal,

0 commit comments

Comments
 (0)