class: fix possible memory leak in _classregister()
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.86 by commit 417ef049e3fd3b0d2593c1d5ffa3d0d5d0a018a7, it was introduced in version v4.10 by commit ced6473e7486702f530a49f886b73195e4977734. For more details please see the references link.