summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-06-25 02:43:02 +0100
committerPádraig Brady <P@draigBrady.com>2015-06-25 02:46:07 +0100
commitad95353bf092a25e97c7f49c7a0d1dda0d5022e3 (patch)
tree3e230274400906018420b4efd327b613f581a0e6 /src
parent77547ba7b26aa65fc0f6dfcc0cb8235686699611 (diff)
downloadcoreutils-ad95353bf092a25e97c7f49c7a0d1dda0d5022e3.tar.xz
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"
Diffstat (limited to 'src')
-rw-r--r--src/make-prime-list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/make-prime-list.c b/src/make-prime-list.c
index b31e1ed26..0d5b614fb 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));