[PATCH] dm stats: fix a memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike

This fixes a memory leak in dm-stats. Put it into your queue of patches 
for Linus.

Mikulas


From: Mikulas Patocka <mpatocka@xxxxxxxxxx>

Fix a leaked array s->histogram_boundaries.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Fixes: dfcfac3e4cd9 ("dm stats: collect and report histogram of IO latencies")
Cc: stable@xxxxxxxxxxxxxxx	# v4.2+

---
 drivers/md/dm-stats.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/drivers/md/dm-stats.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-stats.c
+++ linux-2.6/drivers/md/dm-stats.c
@@ -175,6 +175,7 @@ static void dm_stat_free(struct rcu_head
 	int cpu;
 	struct dm_stat *s = container_of(head, struct dm_stat, rcu_head);
 
+	kfree(s->histogram_boundaries);
 	kfree(s->program_id);
 	kfree(s->aux_data);
 	for_each_possible_cpu(cpu) {

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux