thermal: core: fix some possible name leaks in error paths
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v6.0.16 by commit c4c435d3637b5d0abaa6447c7366c3674364968a, it was introduced in version v5.16 by commit 1dd7128b839f631b31a9e9dce3aaf639bef74e9d. For more details please see the references link.