[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/27] maint: improve -fanalyzer malloc checking
From: |
Paul Eggert |
Subject: |
[PATCH 02/27] maint: improve -fanalyzer malloc checking |
Date: |
Sun, 1 Aug 2021 18:17:56 -0700 |
* lib/canonicalize.h:
---
ChangeLog | 1 +
lib/canonicalize.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index f63846d2b..1af0b926a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
maint: improve -fanalyzer malloc checking
* lib/backup-internal.h, lib/backupfile.h:
+ * lib/canonicalize.h:
Add malloc-related attributes and include stdlib.h as needed.
2021-08-01 Jim Meyering <meyering@fb.com>
diff --git a/lib/canonicalize.h b/lib/canonicalize.h
index f3054d42f..1f7a5fdff 100644
--- a/lib/canonicalize.h
+++ b/lib/canonicalize.h
@@ -48,7 +48,8 @@ typedef enum canonicalize_mode_t canonicalize_mode_t;
Whether components must exist or not depends on canonicalize mode.
The result is malloc'd.
Upon failure, return NULL with errno set. */
-char *canonicalize_filename_mode (const char *, canonicalize_mode_t);
+char *canonicalize_filename_mode (const char *, canonicalize_mode_t)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
#ifdef __cplusplus
}
--
2.31.1
- [PATCH 01/27] backupfile: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 02/27] maint: improve -fanalyzer malloc checking,
Paul Eggert <=
- [PATCH 03/27] dfa: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 04/27] dirname: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 05/27] exclude: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 06/27] filenamecat-lgpl: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 08/27] modechange: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 07/27] malloca: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 09/27] mountlist: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01