[PATCH openEuler-5.10 235/427] thermal/core: Fix memory leak in __thermal_cooling_device_register()