From 02142482c1a73567a53043a0f458380fd7c9be09 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 21 May 2020 19:40:59 +0200 Subject: [PATCH] glob: Avoid wrong configure results with "clang -fsanitize=leak". MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Tim Rühsen in . * m4/glob.m4 (gl_GLOB): Free allocated memory before returning. --- ChangeLog | 7 +++++++ m4/glob.m4 | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) 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], -- 2.39.5