From: Jesper Juhl Date: Sat, 25 Jun 2005 21:58:48 +0000 (-0700) Subject: [PATCH] remove redundant NULL check before before kfree() in kernel/sysctl.c X-Git-Tag: v2.6.13-rc1~68^2~63 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a6b454f8024bac68495b6cd51615feb0b54baa9;p=linux-2.6 [PATCH] remove redundant NULL check before before kfree() in kernel/sysctl.c Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 24a4d12d5a..270ee7fadb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -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;