Merge "Fix clang warnings and leak of full_stats_file ."
diff --git a/tests/ext4/rand_emmc_perf.c b/tests/ext4/rand_emmc_perf.c
index ebd10c8..fed7a54 100644
--- a/tests/ext4/rand_emmc_perf.c
+++ b/tests/ext4/rand_emmc_perf.c
@@ -51,8 +51,8 @@
{
int i;
struct timeval t;
- struct timeval sum = { 0 };
- struct timeval max = { 0 };
+ struct timeval sum = { 0, 0 };
+ struct timeval max = { 0, 0 };
long long total_usecs;
long long avg_usecs;
long long max_usecs;
@@ -217,6 +217,7 @@
break;
case 'f':
+ free(full_stats_file);
full_stats_file = strdup(optarg);
if (full_stats_file == NULL) {
fprintf(stderr, "Cannot get full stats filename\n");
@@ -258,6 +259,7 @@
} else {
perf_test(fd, write_mode, max_blocks);
}
+ free(full_stats_file);
exit(0);
}