Commit 74c0f4d0 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[PPP] fix memory leak in ioctl error path

parent 6890c8f3
......@@ -682,8 +682,10 @@ static int ppp_ioctl(struct inode *inode, struct file *file,
if (code == 0)
break;
err = -EFAULT;
if (copy_from_user(code, uprog.filter, len))
if (copy_from_user(code, uprog.filter, len)) {
kfree(code);
break;
}
err = sk_chk_filter(code, uprog.len);
if (err) {
kfree(code);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment