[2.6 patch] show_schedstat(): fix memleak

From: Adrian Bunk
Date: Thu Apr 24 2008 - 21:22:31 EST


The Coverity checker spotted a memleak introduced by
commit 39106dcf85285e78f3b290022122c76f851379b8
(cpumask: use new cpus_scnprintf function).

It seems the kfree() got lost between v2 and v3 of this patch...

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxxx>

---
acbecac5e146985135635ea992df9a9d83280256 diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h
index 5bae2e0..a38878e 100644
--- a/kernel/sched_stats.h
+++ b/kernel/sched_stats.h
@@ -67,6 +67,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
preempt_enable();
#endif
}
+ kfree(mask_str);
return 0;
}

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