diff options
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 090f927a2..b5bc77d74 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1608,7 +1608,6 @@ static char *handle_cli_moh_show_files(struct ast_cli_entry *e, int cmd, struct return CLI_SHOWUSAGE; i = ao2_iterator_init(mohclasses, 0); - for (; (class = ao2_t_iterator_next(&i, "Show files iterator")); mohclass_unref(class, "Unref iterator in moh show files")) { int x; @@ -1621,6 +1620,7 @@ static char *handle_cli_moh_show_files(struct ast_cli_entry *e, int cmd, struct ast_cli(a->fd, "\tFile: %s\n", class->filearray[x]); } } + ao2_iterator_destroy(&i); return CLI_SUCCESS; } @@ -1645,7 +1645,6 @@ static char *handle_cli_moh_show_classes(struct ast_cli_entry *e, int cmd, struc return CLI_SHOWUSAGE; i = ao2_iterator_init(mohclasses, 0); - for (; (class = ao2_t_iterator_next(&i, "Show classes iterator")); mohclass_unref(class, "Unref iterator in moh show classes")) { ast_cli(a->fd, "Class: %s\n", class->name); ast_cli(a->fd, "\tMode: %s\n", S_OR(class->mode, "<none>")); @@ -1657,6 +1656,7 @@ static char *handle_cli_moh_show_classes(struct ast_cli_entry *e, int cmd, struc ast_cli(a->fd, "\tFormat: %s\n", ast_getformatname(class->format)); } } + ao2_iterator_destroy(&i); return CLI_SUCCESS; } |