staging: lirc: freeing ERR_PTRs
Subsystems (3)
PATCH 1/1 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 Dan Carpenter <[email protected]>
drivers/staging/media/lirc/lirc_imon.c +1 -0
@@ -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; }
drivers/staging/media/lirc/lirc_sasem.c +1 -0
@@ -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; }