Hi! > ensure close FILE pointer before return > > Signed-off-by: Wei,Jiangang <weijg.f...@cn.fujitsu.com> > --- > testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c > b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c > index 97d7689..8b9a05f 100644 > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c > @@ -439,6 +439,7 @@ static int checksys(char *path, char *string, int value) > if (atoi(buf) != value) { > tst_resm(TFAIL, "%s is not %d but %d.", string, value, > atoi(buf)); > + fclose(fp); > return 1; > } > fclose(fp); > @@ -474,6 +475,7 @@ static void init_hugepagesize(void) > if (lookup(line, "Hugepagesize")) { > tst_resm(TINFO, "Hugepagesize is %s kB", buf); > hugepagesize = atoi(buf) * 1024; > + fclose(fp); > return; > } > }
Applied, thanks. Hint: These function can be replaced with SAFE_FILE_SCANF() and one comparsion. -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list