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