mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
vfio: don't dereference after kfree...
Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
312b90fbed
commit
934ad4c235
1 changed files with 2 additions and 1 deletions
|
@ -416,8 +416,9 @@ static void vfio_device_release(struct kref *kref)
|
|||
/* Device reference always implies a group reference */
|
||||
static void vfio_device_put(struct vfio_device *device)
|
||||
{
|
||||
struct vfio_group *group = device->group;
|
||||
kref_put(&device->kref, vfio_device_release);
|
||||
vfio_group_put(device->group);
|
||||
vfio_group_put(group);
|
||||
}
|
||||
|
||||
static void vfio_device_get(struct vfio_device *device)
|
||||
|
|
Loading…
Reference in a new issue