Don't mark realloc with __attribute__((malloc))

According to
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

realloc should NOT be marked with __attribute__((malloc)). Quoting:

   realloc-like functions do not have this property as the memory
   pointed to does not have undefined content.

For reference, __mallocfunc is defined in sys/cdefs.h as:

    #define __mallocfunc  __attribute__((malloc))

Change-Id: I56083542ba92e4608dd7c55fb5596a138eb50cc9
This commit is contained in:
Nick Kralevich 2012-06-13 15:43:14 -07:00
parent c2f1d215b1
commit b27631b9ae
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ __BEGIN_DECLS
extern __mallocfunc void* malloc(size_t);
extern __mallocfunc void* calloc(size_t, size_t);
extern __mallocfunc void* realloc(void *, size_t);
extern void* realloc(void *, size_t);
extern void free(void *);
extern void* memalign(size_t alignment, size_t bytesize);