]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix memory leak in AC_FUNC_MMAP
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 Feb 2016 05:06:20 +0000 (21:06 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 6 Feb 2016 05:06:45 +0000 (21:06 -0800)
* lib/autoconf/functions.m4 (AC_FUNC_MMAP): Fix memory leak
in test case, found by configuring with gcc -fsanitize=address.

lib/autoconf/functions.m4

index 5d55e2db5087ddee5b2fa6b183890c7e16b018eb..51ae5a42ca3312eb71f5325a5f64785a478ddd13 100644 (file)
@@ -1342,6 +1342,8 @@ main (void)
     if (*(data + i) != *(data3 + i))
       return 14;
   close (fd);
+  free (data);
+  free (data3);
   return 0;
 }]])],
               [ac_cv_func_mmap_fixed_mapped=yes],