bug-gnulib
[Top][All Lists]
Advanced

[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




reply via email to

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