From: Bruno Haible Date: Thu, 21 May 2020 17:40:59 +0000 (+0200) Subject: glob: Avoid wrong configure results with "clang -fsanitize=leak". X-Git-Tag: v1.0~4087 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=02142482c1a73567a53043a0f458380fd7c9be09;p=gnulib.git glob: Avoid wrong configure results with "clang -fsanitize=leak". Reported by Tim Rühsen in . * m4/glob.m4 (gl_GLOB): Free allocated memory before returning. --- diff --git a/ChangeLog b/ChangeLog index b9048453e2..000953cf87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-05-21 Bruno Haible + + glob: Avoid wrong configure results with "clang -fsanitize=leak". + Reported by Tim Rühsen in + . + * m4/glob.m4 (gl_GLOB): Free allocated memory before returning. + 2020-05-21 Bruno Haible fchownat: Support clang -fsanitize=implicit-integer-sign-change better. diff --git a/m4/glob.m4 b/m4/glob.m4 index dbd09e8fcf..d4cd03fc18 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -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],