mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Audit of ao2_iterator_init() usage for v1.8.
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result. Review: https://reviewboard.asterisk.org/r/1697/ ........ Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -173,6 +173,7 @@ static char *tps_taskprocessor_tab_complete(struct ast_taskprocessor *p, struct
|
||||
}
|
||||
ao2_ref(p, -1);
|
||||
}
|
||||
ao2_iterator_destroy(&i);
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -266,6 +267,7 @@ static char *cli_tps_report(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
|
||||
ast_cli(a->fd, "\n%24s %17ld %12ld %12ld", name, processed, qsize, maxqsize);
|
||||
ao2_ref(p, -1);
|
||||
}
|
||||
ao2_iterator_destroy(&i);
|
||||
tcount = ao2_container_count(tps_singletons);
|
||||
ast_cli(a->fd, "\n\t+---------------------+-----------------+------------+-------------+\n\t%d taskprocessors\n\n", tcount);
|
||||
return CLI_SUCCESS;
|
||||
|
Reference in New Issue
Block a user