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

Commit 3232e04d authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] staging: lirc: freeing ERR_PTRs



We call kfree(data_buf) in the error handling and that will oops if this
is an error pointer.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fb91bde9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -414,6 +414,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
	data_buf = memdup_user(buf, n_bytes);
	if (IS_ERR(data_buf)) {
		retval = PTR_ERR(data_buf);
		data_buf = NULL;
		goto exit;
	}

+1 −0
Original line number Diff line number Diff line
@@ -392,6 +392,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
	data_buf = memdup_user((void const __user *)buf, n_bytes);
	if (IS_ERR(data_buf)) {
		retval = PTR_ERR(data_buf);
		data_buf = NULL;
		goto exit;
	}