]> Savannah Git Hosting - gnulib.git/commitdiff
maint: improve -fanalyzer malloc checking
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 00:24:52 +0000 (17:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2021 01:06:53 +0000 (18:06 -0700)
* lib/canonicalize.h:

ChangeLog
lib/canonicalize.h

index f63846d2b266c5702b1a89f02a163c093313f20d..1af0b926ad274b02685a93ca0374e1bbe7a95b29 100644 (file)
--- 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>
index f3054d42fed6082553c6550dad8e96919f712fd9..1f7a5fdff5bc1932df0788a9796c8bf0e7993d0f 100644 (file)
@@ -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
 }