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

Commit 470a9147 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] usbvision-video: two use after frees



The lock has been freed in usbvision_release() so there is no need to
call mutex_unlock() here.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a4789e6f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -446,6 +446,7 @@ static int usbvision_v4l2_close(struct file *file)
	if (usbvision->remove_pending) {
		printk(KERN_INFO "%s: Final disconnect\n", __func__);
		usbvision_release(usbvision);
		return 0;
	}
	mutex_unlock(&usbvision->v4l2_lock);

@@ -1221,6 +1222,7 @@ static int usbvision_radio_close(struct file *file)
	if (usbvision->remove_pending) {
		printk(KERN_INFO "%s: Final disconnect\n", __func__);
		usbvision_release(usbvision);
		return err_code;
	}

	mutex_unlock(&usbvision->v4l2_lock);