From: Pádraig Brady
Date: Thu, 25 Jun 2015 01:43:02 +0000 (+0100) Subject: build: allow build to complete with -fsanitize=address X-Git-Tag: v8.24~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad95353bf092a25e97c7f49c7a0d1dda0d5022e3;p=thirdparty%2Fcoreutils.git build: allow build to complete with -fsanitize=address * src/make-prime-list.c (main): When building with the above option, avoid this build stopping error: "LeakSanitizer: detected memory leaks" --- diff --git a/src/make-prime-list.c b/src/make-prime-list.c index b31e1ed261..0d5b614fb6 100644 --- a/src/make-prime-list.c +++ b/src/make-prime-list.c @@ -217,6 +217,9 @@ main (int argc, char **argv) output_primes (prime_list, nprimes); + free (sieve); + free (prime_list); + if (ferror (stdout) + fclose (stdout)) { fprintf (stderr, "write error: %s\n", strerror (errno));