Thermal control fix for 5.17-rc6

Fix a memory leak in the int340x thermal driver's ACPI notify
 handler (Chuansheng Liu).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmIY9SISHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxFhsQAIQfLxjQrCnRbnQXxXcW5K5HWS+I1HTU
 EbPM9c/O7Dmd6KpxkVci8wLDnrqCoiYsI7oDQdNDvlRt63fWJQuDy4lMmK8EJ2Z8
 kQRIOqdgktqKxHkVoWl9f4QqqcnTEF+K0ZX/A4ebxLbo2DvI1D8ILHq8Utp5EUuW
 QTlxGY0IKz0rDtip27kkthhXbrXHbU6fX4gBtAEkSM2jRqefetyV2td8ZFXYBMGO
 ZAwDiSYC24g4H0/RKDgGWFpXndcIWbFNNOXiiRjKO238gbrGeNCTT54rw6lisfW9
 mo7uV1P6ybbEWpbQwpps2foYUkZrFxOTX+fthcCi3tgjg61f/s5ajJ5PPT7K1283
 uuwat1lgHwqoMC5gXndMUWD+/2T/XAhOEqpI++m9IfB8YXv1ZMW7PmcPD6BGLgEE
 7XPfLF31agm9rHXBquPxw1vFIjSallQINUYBCRGIWp7hH1sYqnD8cF73MmtWWcua
 l5Vy4sWJcRWiXsYs6v70cPsIsjmbTURbkMxjwiGNyY4+G9Ur4dhi9W3q3VfYwLei
 CKxRm4+jeHqdsp4+AuuvG6vUCH0RA88q37hqxcpKieMhgV4WfEtRHn1ZQf2joQDl
 WdzEdnZeExk8x8jQTYQr9cnTTVHnuDMAxxIXnhsVtVlHRG49qv4j/RdoVMyf5sup
 hoaLHdzIDZj3
 =aOJ1
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2022-02-25 12:25:44 -08:00
commit e48cb5c2c6

View file

@ -404,6 +404,10 @@ static void int3400_notify(acpi_handle handle,
thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", therm_event);
thermal_prop[4] = NULL;
kobject_uevent_env(&priv->thermal->device.kobj, KOBJ_CHANGE, thermal_prop);
kfree(thermal_prop[0]);
kfree(thermal_prop[1]);
kfree(thermal_prop[2]);
kfree(thermal_prop[3]);
}
static int int3400_thermal_get_temp(struct thermal_zone_device *thermal,