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:
Richard Mudgett
2012-01-27 18:47:16 +00:00
parent 5bfea5fdbf
commit 27b69e7d29
11 changed files with 89 additions and 55 deletions

View File

@@ -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;
}