[PATCH 5.15 098/731] thermal: core: fix some possible name leaks in error paths