[PATCH] Plug a few more leaks

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/stat.c b/stat.c
index fc0abe0..518d14d 100644
--- a/stat.c
+++ b/stat.c
@@ -243,7 +243,9 @@
 		sprintf(foo, "%s", tmp);
 	}
 
-	td->sysfs_root = strdup(foo);
+	if (td->ioscheduler)
+		td->sysfs_root = strdup(foo);
+
 	disk_util_add(dev, foo);
 }
 
@@ -524,6 +526,8 @@
 
 		show_disk_util();
 	}
+
+	free(runstats);
 }
 
 static inline void add_stat_sample(struct io_stat *is, unsigned long val)