File: unconditional-file-leak.c

package info (click to toggle)
python-firehose 0.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,208 kB
  • sloc: python: 2,587; xml: 1,388; makefile: 150; ansic: 34
file content (10 lines) | stat: -rw-r--r-- 172 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>

void test (const char *filename)
{
  int i;
  FILE *f;
  f = fopen (filename, "w");
  for (i = 0; i < 10; i++)
    fprintf (f, "%i: %i",  i,  i * i);
}