From 9e488dd482b0cf69b8e7bb145cd8e22e43ba1f11 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Tue, 13 Mar 2018 17:39:48 -0400 Subject: core: Remove incorrect usage of attribute_malloc. GCC documentation states that when __attribute__((malloc)) is used it should not return storage which contains any valid pointers. It specifically mentions that realloc functions should not have the malloc attribute, but this also means that complex initializers which could contain initialized pointers should not use this attribute. Change-Id: If507f33ffb3ca3b83b702196eb0e8215d27fc7d2 --- include/asterisk/channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asterisk/channel.h') diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 3dfbe61d9..8cb03800e 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1149,7 +1149,7 @@ enum ama_flags { * \deprecated You should use the ast_datastore_alloc() generic function instead. * \version 1.6.1 deprecated */ -struct ast_datastore * attribute_malloc ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid) +struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid) __attribute__((deprecated)); /*! @@ -1208,7 +1208,7 @@ struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const * and "default" context. * \note Since 12.0.0 this function returns with the newly created channel locked. */ -struct ast_channel * attribute_malloc __attribute__((format(printf, 15, 16))) +struct ast_channel * __attribute__((format(printf, 15, 16))) __ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, -- cgit v1.2.3