In the Linux kernel, the following vulnerability has been resolved:
drm/drv: Fix potential memory leak in drmdevinit()
drmdevinit() will add drmdevinitrelease() as a callback. When drmmaddaction() failed, the release function won't be added. As the result, the ref cnt added by deviceget() in drmdevinit() won't be put by drmdevinitrelease(), which leads to the memleak. Use drmmaddactionorreset() instead of drmmadd_action() to prevent memleak.
unreferenced object 0xffff88810bc0c800 (size 2048): comm "modprobe", pid 8322, jiffies 4305809845 (age 15.292s) hex dump (first 32 bytes): e8 cc c0 0b 81 88 ff ff ff ff ff ff 00 00 00 00 ................ 20 24 3c 0c 81 88 ff ff 18 c8 c0 0b 81 88 ff ff $<............. backtrace: [<000000007251f72d>] _kmalloc+0x4b/0x1c0 [<0000000045f21f26>] platformdevicealloc+0x2d/0xe0 [<000000004452a479>] platformdeviceregisterfull+0x24/0x1c0 [<0000000089f4ea61>] 0xffffffffa0736051 [<00000000235b2441>] dooneinitcall+0x7a/0x380 [<0000000001a4a177>] doinitmodule+0x5c/0x230 [<000000002bf8a8e2>] loadmodule+0x227d/0x2420 [<00000000637d6d0a>] _dosysfinitmodule+0xd5/0x140 [<00000000c99fc324>] dosyscall64+0x3f/0x90 [<000000004d85aa77>] entrySYSCALL64after_hwframe+0x63/0xcd