---
 ChangeLog     | 2 +-
 lib/exclude.h | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 884443438..bac4c5fcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
 
        maint: improve -fanalyzer malloc checking
        * lib/backup-internal.h, lib/backupfile.h:
-       * lib/canonicalize.h, lib/dfa.h, lib/dirname.h:
+       * lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
        Add malloc-related attributes and include stdlib.h as needed.
        * lib/dfa.c: Include verify.h.
        (assume_nonnull): New macro.
diff --git a/lib/exclude.h b/lib/exclude.h
index 9ecfbc985..8d6581afa 100644
--- a/lib/exclude.h
+++ b/lib/exclude.h
@@ -48,8 +48,11 @@ struct exclude;
 
 bool fnmatch_pattern_has_wildcards (const char *, int) _GL_ATTRIBUTE_PURE;
 
-struct exclude *new_exclude (void) _GL_ATTRIBUTE_MALLOC;
-void free_exclude (struct exclude *);
+void free_exclude (struct exclude *)
+  _GL_ATTRIBUTE_NONNULL ((1));
+struct exclude *new_exclude (void)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_RETURNS_NONNULL
+  _GL_ATTRIBUTE_DEALLOC (free_exclude, 1);
 void add_exclude (struct exclude *, char const *, int);
 int add_exclude_file (void (*) (struct exclude *, char const *, int),
                       struct exclude *, char const *, int, char);
-- 
2.31.1


Reply via email to