bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 09/27] mountlist: improve -fanalyzer malloc checking


From: Paul Eggert
Subject: [PATCH 09/27] mountlist: improve -fanalyzer malloc checking
Date: Sun, 1 Aug 2021 18:18:03 -0700

---
 ChangeLog       | 1 +
 lib/mountlist.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index dded7f275..f130f9317 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * lib/backup-internal.h, lib/backupfile.h:
        * lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
        * lib/filenamecat.h, lib/malloca.h, lib/modechange.h:
+       * lib/mountlist.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/mountlist.h b/lib/mountlist.h
index 66dbb1aba..fbad12461 100644
--- a/lib/mountlist.h
+++ b/lib/mountlist.h
@@ -37,7 +37,8 @@ struct mount_entry
   struct mount_entry *me_next;
 };
 
-struct mount_entry *read_file_system_list (bool need_fs_type);
+struct mount_entry *read_file_system_list (bool need_fs_type)
+  _GL_ATTRIBUTE_MALLOC;
 void free_mount_entry (struct mount_entry *entry);
 
 #endif
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]