[PATCH 6.0 0134/1073] thermal: core: fix some possible name leaks in error paths