[LTP] [PATCH v1] lib/tst_memutils.c: Fix resource leak
Cyril Hrubis
chrubis@suse.cz
Tue Feb 15 14:04:42 CET 2022
Hi!
> diff --git a/lib/tst_memutils.c b/lib/tst_memutils.c
> index 4a4974761..2e6d7d5fd 100644
> --- a/lib/tst_memutils.c
> +++ b/lib/tst_memutils.c
> @@ -122,7 +122,10 @@ static int write_score(const char *path, int score)
> return 1;
>
> if (fprintf(f, "%d", score) <= 0)
> + {
> + fclose(f);
> return 1;
> + }
The coding style is wrong. Please run 'make check' in the respective
directory when the source code located and fix all warnings.
> if (fclose(f))
> return 1;
> --
> 2.35.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list