2021-08-07  Bruno Haible  <[email protected]>

        fts: Improve GCC 11 allocation-deallocation checking.
        * lib/fts_.h (fts_open): Declare that deallocation must happen through
        'fts_close'.

diff --git a/lib/fts_.h b/lib/fts_.h
index 9f4419c..13cfa30 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -260,7 +260,7 @@ int      fts_close (FTS *) __THROW;
 _GL_ATTRIBUTE_NODISCARD
 FTS     *fts_open (char * const *, int,
                    int (*)(const FTSENT **, const FTSENT **))
-  __THROW;
+  _GL_ATTRIBUTE_DEALLOC (fts_close, 1) __THROW;
 
 _GL_ATTRIBUTE_NODISCARD
 FTSENT  *fts_read (FTS *) __THROW;


Reply via email to