In the Linux kernel, the following vulnerability has been resolved:
siox: fix possible memory leak in sioxdeviceadd()
If deviceregister() returns error in sioxdeviceadd(), the name allocated by devsetname() need be freed. As comment of deviceregister() says, it should use putdevice() to give up the reference in the error path. So fix this by calling putdevice(), then the name can be freed in kobjectcleanup(), and sdevice is freed in sioxdevice_release(), set it to null in error path.