diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-01-27 18:47:16 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-01-27 18:47:16 +0000 |
commit | 27b69e7d29dc100e5fdf3cf911c3a02f3b5fd2b5 (patch) | |
tree | 7ad1cbac33a65eb9773db40058cabff69fe2eef1 /main | |
parent | 5bfea5fdbfca835b29e14ec9a28345c6095431b5 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/indications.c | 2 | ||||
-rw-r--r-- | main/pbx.c | 1 | ||||
-rw-r--r-- | main/taskprocessor.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/main/indications.c b/main/indications.c index ef98407f5..b07de4bc4 100644 --- a/main/indications.c +++ b/main/indications.c @@ -658,6 +658,7 @@ static char *complete_country(struct ast_cli_args *a) break; } } + ao2_iterator_destroy(&i); return res; } @@ -835,6 +836,7 @@ static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct ast_tone_zone_unlock(tz); tz = ast_tone_zone_unref(tz); } + ao2_iterator_destroy(&iter); return CLI_SUCCESS; } diff --git a/main/pbx.c b/main/pbx.c index 204eb8841..e565c480f 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7605,6 +7605,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_ AST_LIST_INSERT_HEAD(&hints_stored, saved_hint, list); } } + ao2_iterator_destroy(&i); /* save the old table and list */ oldtable = contexts_table; diff --git a/main/taskprocessor.c b/main/taskprocessor.c index e0d7e5b94..782a34451 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -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; |