Messages in this thread Patch in this message | | | Date | Sat, 19 Mar 2005 19:58:01 +0100 (CET) | From | Jesper Juhl <> | Subject | [PATCH] remove redundant NULL check before before kfree() in kernel/sysctl.c |
| |
Tiny patch to remove a redundant check for NULL pointer before calling kfree().
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |