]> Savannah Git Hosting - gnulib.git/commitdiff
glob: Avoid wrong configure results with "clang -fsanitize=leak".
authorBruno Haible <bruno@clisp.org>
Thu, 21 May 2020 17:40:59 +0000 (19:40 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 21 May 2020 17:40:59 +0000 (19:40 +0200)
Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.

* m4/glob.m4 (gl_GLOB): Free allocated memory before returning.

ChangeLog
m4/glob.m4

index b9048453e267ae542f8d1ac267c7802f6d34ee03..000953cf87f1cfd0f3822364b9ad65e2d91c783f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-05-21  Bruno Haible  <bruno@clisp.org>
+
+       glob: Avoid wrong configure results with "clang -fsanitize=leak".
+       Reported by Tim Rühsen in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
+       * m4/glob.m4 (gl_GLOB): Free allocated memory before returning.
+
 2020-05-21  Bruno Haible  <bruno@clisp.org>
 
        fchownat: Support clang -fsanitize=implicit-integer-sign-change better.
index dbd09e8fcf393bbe3b9a9ce7ef5954edda3064fe..d4cd03fc1848a6dfa30f4c72c4aaf1f79d800f37 100644 (file)
@@ -1,4 +1,4 @@
-# glob.m4 serial 23
+# glob.m4 serial 24
 dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -47,6 +47,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1
                   [[glob_t found;
                     if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
                       return 1;
+                    globfree (&found);
                   ]])],
                [gl_cv_glob_lists_symlinks=yes],
                [gl_cv_glob_lists_symlinks=no],