In the Linux kernel, the following vulnerability has been resolved: misc: ocxl: fix possible double free in ocxlfileregisterafu inforelease() will be called in deviceunregister() when info->dev's reference count is 0. So there is no need to call ocxlafuput() and kfree() again. Fix this by adding freeminor() and return to err_unregister error path.