summaryrefslogtreecommitdiff
path: root/channels/chan_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_console.c')
-rw-r--r--channels/chan_console.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 4be7f92aa..ead0b1231 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -1013,6 +1013,7 @@ static char *cli_list_devices(struct ast_cli_entry *e, int cmd, struct ast_cli_a
console_pvt_unlock(pvt);
unref_pvt(pvt);
}
+ ao2_iterator_destroy(&i);
ast_cli(a->fd, "=============================================================\n\n");
@@ -1162,9 +1163,12 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
if (++x > a->n && !strncasecmp(pvt->name, a->word, strlen(a->word)))
res = ast_strdup(pvt->name);
unref_pvt(pvt);
- if (res)
+ if (res) {
+ ao2_iterator_destroy(&i);
return res;
+ }
}
+ ao2_iterator_destroy(&i);
}
return NULL;
}
@@ -1367,6 +1371,7 @@ static void destroy_pvts(void)
}
unref_pvt(pvt);
}
+ ao2_iterator_destroy(&i);
}
/*!
@@ -1440,6 +1445,7 @@ static void stop_streams(void)
stop_stream(pvt);
unref_pvt(pvt);
}
+ ao2_iterator_destroy(&i);
}
static int unload_module(void)