thermal/core: Fix memory leak in _thermalcoolingdeviceregister()
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 v5.10.121 by commit 18530bedd221160823f63ccc20dd55c7a03edbcf, it was introduced in version v4.17 by commit 8ea229511e06f9635ecc338dcbe0db41a73623f0. For more details please see the references link.