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, ...@@ -682,8 +682,10 @@ static int ppp_ioctl(struct inode *inode, struct file *file,
if (code == 0) if (code == 0)
break; break;
err = -EFAULT; err = -EFAULT;
if (copy_from_user(code, uprog.filter, len)) if (copy_from_user(code, uprog.filter, len)) {
kfree(code);
break; break;
}
err = sk_chk_filter(code, uprog.len); err = sk_chk_filter(code, uprog.len);
if (err) { if (err) {
kfree(code); 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