From b6f10c626ed522854c4f7cbbb6c2ebecd33bf96e Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 25 May 2017 15:29:35 -0400 Subject: [PATCH 19/38] FIXME: test-sources/unconditional-file-leak.c --- checkers/test-sources/unconditional-file-leak.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 checkers/test-sources/unconditional-file-leak.c diff --git a/checkers/test-sources/unconditional-file-leak.c b/checkers/test-sources/unconditional-file-leak.c new file mode 100644 index 0000000..b4c6153 --- /dev/null +++ b/checkers/test-sources/unconditional-file-leak.c @@ -0,0 +1,8 @@ +#include + +void test (const char *filename) +{ + FILE *f = fopen (filename, "w"); + for (int i = 0; i < 10; i++) + fprintf (f, "%i: %i", i, i * i); +} -- 1.8.5.3