[PATCH] if (foo) kfree(foo) /kernel cleanup

From: Zwane Mwaikambo (zwane@linux.realnet.co.sz)
Date: Sat Dec 01 2001 - 06:36:03 EST


diff -urN linux-2.5.1-pre4.orig/kernel/sysctl.c linux-2.5.1-pre4.kfree/kernel/sysctl.c
--- linux-2.5.1-pre4.orig/kernel/sysctl.c Fri Oct 5 21:23:53 2001
+++ linux-2.5.1-pre4.kfree/kernel/sysctl.c Sat Dec 1 09:06:30 2001
@@ -343,8 +343,7 @@
                 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/



This archive was generated by hypermail 2b29 : Fri Dec 07 2001 - 21:00:16 EST