mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
stasis: use ao2_t_alloc for certain object allocators
Add tags to stasis objects using the name. This makes it easier to track the source of certain stasis ref leaks. Review: https://reviewboard.asterisk.org/r/3821/ ........ Merged revisions 418996 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -204,7 +204,7 @@ struct stasis_topic *stasis_topic_create(const char *name)
|
||||
struct stasis_topic *topic;
|
||||
int res = 0;
|
||||
|
||||
topic = ao2_alloc(sizeof(*topic), topic_dtor);
|
||||
topic = ao2_t_alloc(sizeof(*topic), topic_dtor, name);
|
||||
if (!topic) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -311,7 +311,7 @@ struct stasis_subscription *internal_stasis_subscribe(
|
||||
}
|
||||
|
||||
/* The ao2 lock is used for join_cond. */
|
||||
sub = ao2_alloc(sizeof(*sub), subscription_dtor);
|
||||
sub = ao2_t_alloc(sizeof(*sub), subscription_dtor, topic->name);
|
||||
if (!sub) {
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user