aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a9da5b732..ccf316273 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -1325,6 +1325,7 @@ static int iax2_getpeername(struct sockaddr_in sin, char *host, int len)
}
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
if (!peer) {
peer = realtime_peer(NULL, &sin);
@@ -2132,6 +2133,7 @@ static int iax2_show_callnumber_usage(int fd, int argc, char *argv[])
}
ao2_ref(peercnt, -1);
}
+ ao2_iterator_destroy(&i);
if (argc == 4) {
ast_cli(fd, "\nNon-CallToken Validation Limit: %d\nNon-CallToken Validated: %d\n", global_maxcallno_nonval, total_nonval_callno_used);
} else if (argc == 5 && !found) {
@@ -3276,6 +3278,7 @@ static char *complete_iax2_show_peer(const char *line, const char *word, int pos
}
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
return res;
}
@@ -4870,6 +4873,7 @@ static int iax2_getpeertrunk(struct sockaddr_in sin)
}
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
return res;
}
@@ -5700,6 +5704,7 @@ static int iax2_show_users(int fd, int argc, char *argv[])
user->contexts ? user->contexts->context : context,
user->ha ? "Yes" : "No", pstr);
}
+ ao2_iterator_destroy(&i);
if (havepattern)
regfree(&regexbuf);
@@ -5817,6 +5822,7 @@ static int __iax2_show_peers(int manager, int fd, struct mansession *s, int argc
peer->encmethods ? "(E)" : " ", status, term);
total_peers++;
}
+ ao2_iterator_destroy(&i);
if (s)
astman_append(s,"%d iax2 peers [%d online, %d offline, %d unmonitored]%s", total_peers, online_peers, offline_peers, unmonitored_peers, term);
@@ -6348,6 +6354,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies
ast_codec_pref_convert(&iaxs[callno]->rprefs, ies->codec_prefs, 32, 0);
ast_codec_pref_convert(&iaxs[callno]->prefs, ies->codec_prefs, 32, 0);
}
+ ao2_iterator_destroy(&i);
if (!gotcapability)
iaxs[callno]->peercapability = iaxs[callno]->peerformat;
@@ -6415,6 +6422,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies
}
user_unref(user);
}
+ ao2_iterator_destroy(&i);
user = best;
if (!user && !ast_strlen_zero(iaxs[callno]->username)) {
user = realtime_user(iaxs[callno]->username, sin);
@@ -6944,6 +6952,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin,
}
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
if (!peer) {
/* We checked our list and didn't find one. It's unlikely, but possible,
that we're trying to authenticate *to* a realtime peer */
@@ -11202,6 +11211,7 @@ static void prune_users(void)
}
user_unref(user);
}
+ ao2_iterator_destroy(&i);
}
/* Prune peers who still are supposed to be deleted */
@@ -11217,6 +11227,7 @@ static void prune_peers(void)
}
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
}
static void set_timing(void)
@@ -11637,6 +11648,7 @@ static void poke_all_peers(void)
iax2_poke_peer(peer, 0);
peer_unref(peer);
}
+ ao2_iterator_destroy(&i);
}
static int reload_config(void)
{