Tiny patch to remove a redundant check for NULL pointer before calling kfree().

Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>

diff -up linux-2.6.11-mm4-orig/kernel/sysctl.c linux-2.6.11-mm4/kernel/sysctl.c
--- linux-2.6.11-mm4-orig/kernel/sysctl.c       2005-03-16 15:45:40.000000000 
+0100
+++ linux-2.6.11-mm4/kernel/sysctl.c    2005-03-19 19:52:18.000000000 +0100
@@ -991,8 +991,7 @@ int do_sysctl(int __user *name, int nlen
                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;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to