In the Linux kernel, the following vulnerability has been resolved:
dmaengine: ti: k3-udma-glue: fix memory leak when register device fail
If deviceregister() fails, it should call putdevice() to give up reference, the name allocated in devsetname() can be freed in callback function kobject_cleanup().