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.15.46 by commit 21ccc58b671aea924f2481cf5c1cf0ebbfd3552d, it was introduced in version v4.17 by commit 8ea229511e06f9635ecc338dcbe0db41a73623f0. For more details please see the references link.