]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: allow build to complete with -fsanitize=address
authorPádraig Brady <P@draigBrady.com>
Thu, 25 Jun 2015 01:43:02 +0000 (02:43 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 25 Jun 2015 01:46:07 +0000 (02:46 +0100)
* src/make-prime-list.c (main): When building with
the above option, avoid this build stopping error:
"LeakSanitizer: detected memory leaks"

src/make-prime-list.c

index b31e1ed261cdcbc60a012867c238a02d80446cf4..0d5b614fb6aed0845f7318e1f1d8eb760b0768cf 100644 (file)
@@ -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));