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

Commit 8e485917 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds
Browse files

Videopix Frame Grabber: Fix unreleased lock in vfc_debug()



Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails

Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: default avatar"David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0af1a450
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
					buffer,inout.len);
					buffer,inout.len);


		if (copy_to_user(argp,&inout,sizeof(inout))) {
		if (copy_to_user(argp,&inout,sizeof(inout))) {
			vfc_unlock_device(dev);
			kfree(buffer);
			kfree(buffer);
			return -EFAULT;
			return -EFAULT;
		}
		}