]> Savannah Git Hosting - gnulib.git/commitdiff
getdelim: Avoid wrong configure results with gcc -fsanitize=address.
authorTim Rühsen <tim.ruehsen@gmx.de>
Mon, 18 May 2020 10:36:16 +0000 (12:36 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 21 May 2020 14:31:12 +0000 (16:31 +0200)
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.

ChangeLog
m4/getdelim.m4

index 1c39b92e6a9f5c4cd3f3ead6fd492780631badfc..2133ea5372ea9cec96a7c333902e19ebad44a5b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-18  Tim Rühsen  <tim.ruehsenqgmx.de>
+
+       getdelim: Avoid wrong configure results with gcc -fsanitize=address.
+       * m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.
+
 2020-05-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        ftoastr: fix ifndef typo
index 9f4c7f6e9798bffbcdd353059c47c7c8214c7313..ac3917b113f899d309ce1ce060d72a7ebcf10958 100644 (file)
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 14
+# getdelim.m4 serial 15
 
 dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
 dnl
@@ -42,6 +42,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
         int len = getdelim (&line, &siz, '\n', in);
         if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
           { free (line); fclose (in); return 2; }
+        free (line);
       }
       {
         /* Test result for a NULL buffer and a non-zero size.