mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-05 20:55:26 +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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -70,7 +70,7 @@ struct stasis_cp_all *stasis_cp_all_create(const char *name,
|
||||
RAII_VAR(char *, cached_name, NULL, ast_free);
|
||||
RAII_VAR(struct stasis_cp_all *, all, NULL, ao2_cleanup);
|
||||
|
||||
all = ao2_alloc(sizeof(*all), all_dtor);
|
||||
all = ao2_t_alloc(sizeof(*all), all_dtor, name);
|
||||
if (!all) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ struct stasis_cp_single *stasis_cp_single_create(struct stasis_cp_all *all,
|
||||
{
|
||||
RAII_VAR(struct stasis_cp_single *, one, NULL, ao2_cleanup);
|
||||
|
||||
one = ao2_alloc(sizeof(*one), one_dtor);
|
||||
one = ao2_t_alloc(sizeof(*one), one_dtor, name);
|
||||
if (!one) {
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user