aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAri Sundholm <ari@tuxera.com>2017-12-20 19:00:10 +0200
committerEryu Guan <eguan@redhat.com>2017-12-24 21:30:58 +0800
commit6db67b725296e7a633c0a99e6b218695b95c6a01 (patch)
tree310f8495f5116df6945e4cb0c93884fd3ccbad76
parent3d04948b8238d6f33568b0a0fa1c7a177363ab6c (diff)
downloadxfstests-6db67b725296e7a633c0a99e6b218695b95c6a01.tar.gz
fsstress: Eliminate valgrind noise
This patch plugs what we think are the remaining sources of valgrind noise we found when running fsstress under valgrind. The noise is caused by memory being left unfreed before process termination. Signed-off-by: Ari Sundholm <ari@tuxera.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
-rw-r--r--ltp/fsstress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 96f48b1c27..13d5dd54b1 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -614,6 +614,9 @@ int main(int argc, char **argv)
return 1;
}
#endif
+
+ cleanup_flist();
+ free(freq_table);
return 0;
}
}
@@ -640,6 +643,7 @@ int main(int argc, char **argv)
close(fd);
}
+ free(freq_table);
unlink(buf);
return 0;
}
@@ -997,6 +1001,7 @@ doproc(void)
}
errout:
chdir("..");
+ free(homedir);
if (cleanup) {
sprintf(cmd, "rm -rf %s", buf);
system(cmd);