[PATCH] remove redundant NULL check before before kfree() in kernel/sysctl.c
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
486fd404fb
commit
5a6b454f80
@ -1000,8 +1000,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
|
|||||||
int error = parse_table(name, nlen, oldval, oldlenp,
|
int error = parse_table(name, nlen, oldval, oldlenp,
|
||||||
newval, newlen, head->ctl_table,
|
newval, newlen, head->ctl_table,
|
||||||
&context);
|
&context);
|
||||||
if (context)
|
kfree(context);
|
||||||
kfree(context);
|
|
||||||
if (error != -ENOTDIR)
|
if (error != -ENOTDIR)
|
||||||
return error;
|
return error;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user