From: Niels Möller Date: Mon, 10 Sep 2012 19:59:29 +0000 (+0200) Subject: Explicitly deallocate storage before exit. X-Git-Tag: nettle_2.6_release_20130116~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b59383d971fac7105c91597d7897ef65c81ec42c;p=thirdparty%2Fnettle.git Explicitly deallocate storage before exit. --- diff --git a/ChangeLog b/ChangeLog index 2c1fde94..fe61ad96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-09-10 Niels Möller + * 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. diff --git a/examples/eratosthenes.c b/examples/eratosthenes.c index 2b9d04fd..966506aa 100644 --- a/examples/eratosthenes.c +++ b/examples/eratosthenes.c @@ -399,5 +399,9 @@ main (int argc, char **argv) printf("%lu\n", n); } } + + free(sieve); + free(block); + return EXIT_SUCCESS; }