Commit 827a075
committed
thermal: core: Free tzp copy along with the thermal zone
The object pointed to by tz->tzp may still be accessed after being
freed in thermal_zone_device_unregister(), so move the freeing of it
to the point after the removal completion has been completed at which
it cannot be accessed any more.
Fixes: 3d439b1 ("thermal/core: Alloc-copy-free the thermal zone parameters structure")
Cc: 6.8+ <[email protected]> # 6.8+
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>
Link: https://patch.msgid.link/[email protected]1 parent a42a583 commit 827a075
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | 1609 | | |
1613 | 1610 | | |
1614 | 1611 | | |
1615 | 1612 | | |
1616 | 1613 | | |
| 1614 | + | |
1617 | 1615 | | |
1618 | 1616 | | |
1619 | 1617 | | |
| |||
0 commit comments