Skip to content
Snippets Groups Projects
Commit b59383d9 authored by Niels Möller's avatar Niels Möller
Browse files

Explicitly deallocate storage before exit.

parent 2bd9d1b8
No related branches found
No related tags found
No related merge requests found
2012-09-10 Niels Möller <nisse@lysator.liu.se>
* examples/eratosthenes.c (main): Explicitly deallocate storage
before exit.
* examples/io.c (read_file): Explicitly treat an empty file as an
error. Rearrange loop, check for short fread return value.
......
......@@ -399,5 +399,9 @@ main (int argc, char **argv)
printf("%lu\n", n);
}
}
free(sieve);
free(block);
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment