From 7aa1662353854a861a11162d368d70420cc991d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 1 Aug 2021 17:37:11 -0700 Subject: [PATCH] mountlist: improve -fanalyzer malloc checking --- ChangeLog | 1 + lib/mountlist.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dded7f2752..f130f9317e 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 66dbb1abaf..fbad12461b 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.39.5