Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934ad4c2 authored by Al Viro's avatar Al Viro
Browse files

vfio: don't dereference after kfree...

parent 312b90fb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -416,8 +416,9 @@ static void vfio_device_release(struct kref *kref)
/* Device reference always implies a group reference */
/* Device reference always implies a group reference */
static void vfio_device_put(struct vfio_device *device)
static void vfio_device_put(struct vfio_device *device)
{
{
	struct vfio_group *group = device->group;
	kref_put(&device->kref, vfio_device_release);
	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)
static void vfio_device_get(struct vfio_device *device)