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 v6.0.16 by commit e764ad5918a099ebeb909ccff83893a714e497e1, it was introduced in version v4.10 by commit ced6473e7486702f530a49f886b73195e4977734. For more details please see the references link.