[PATCH] if (foo) kfree(foo) /kernel cleanup
Zwane Mwaikambo (zwane@linux.realnet.co.sz)
Sat, 1 Dec 2001 13:36:03 +0200 (SAST)
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/