In the Linux kernel, the following vulnerability has been resolved: Input: synaptics-rmi4 - fix use after free in rmiunregisterfunction() The putdevice() calls rmireleasefunction() which frees "fn" so the dereference on the next line "fn->numofirqs" is a use after free. Move the putdevice() to the end to fix this.