Skip to content

Commit

Permalink
[PATCH] remove redundant NULL check before before kfree() in kernel/s…
Browse files Browse the repository at this point in the history
…ysctl.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>
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Jun 25, 2005
1 parent 486fd40 commit 5a6b454
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
newval, newlen, head->ctl_table,
&context);
if (context)
kfree(context);
kfree(context);
if (error != -ENOTDIR)
return error;
tmp = tmp->next;
Expand Down

0 comments on commit 5a6b454

Please sign in to comment.