mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6 patch] show_schedstat(): fix memleak
@ 2008-04-25  1:21 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2008-04-25  1:21 UTC (permalink / raw)
  To: Mike Travis, Ingo Molnar; +Cc: linux-kernel

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@kernel.org>

---
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;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-25  1:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-25  1:21 [2.6 patch] show_schedstat(): fix memleak Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®