diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2009-05-05 10:34:19 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2009-05-05 10:34:19 +0000 |
commit | ec5116f80c7ed6922bdc483f11b220ebbee8618b (patch) | |
tree | d0b46bfb8216c1ae395bd39991084a219a5e0966 /include/asterisk/datastore.h | |
parent | d8182202efdc2f292f64718cc038eee982850786 (diff) |
Properly account for memory allocated for channels and datastores
As in previous commits, when channels are allocated (with ast_channel_alloc) or datastores are allocated (with ast_datastore_alloc) properly account for the memory being owned by the caller, instead of the allocator function itself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/datastore.h')
-rw-r--r-- | include/asterisk/datastore.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/datastore.h b/include/asterisk/datastore.h index 6da1bd0bb..5f7e52348 100644 --- a/include/asterisk/datastore.h +++ b/include/asterisk/datastore.h @@ -65,7 +65,10 @@ struct ast_datastore { * \param[in] uid unique identifer * \version 1.6.1 moved here and renamed from ast_channel_datastore_alloc */ -struct ast_datastore *ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid); +struct ast_datastore * attribute_malloc __ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid, + const char *file, int line, const char *function); + +#define ast_datastore_alloc(info, uid) __ast_datastore_alloc(info, uid, __FILE__, __LINE__, __PRETTY_FUNCTION__) /*! * \brief Free a data store object |