From: Ari Sundholm Date: Wed, 20 Dec 2017 17:00:10 +0000 (+0200) Subject: fsstress: Eliminate valgrind noise X-Git-Tag: v2022.05.01~1728 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6db67b725296e7a633c0a99e6b218695b95c6a01;p=users%2Fhch%2Fxfstests-dev.git 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/ltp/fsstress.c b/ltp/fsstress.c index 96f48b1c2..13d5dd54b 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);