aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-23 14:41:50 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-23 14:41:50 +0000
commit8f0f7a226dacbd414c875493989858d9c51057e6 (patch)
treed3db8e7108ffe261ceff970e529924a05cda9bfd
parentaf86f472508b454cb8c49f0eba334aa578549ffc (diff)
Fixes an iterator memory leak and uninitialized memory
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@225650 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 50756fae0..b7ad6cd58 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -14980,6 +14980,7 @@ static char *sip_show_tcp(struct ast_cli_entry *e, int cmd, struct ast_cli_args
(th->tcptls_session->client ? "Client" : "Server"));
ao2_t_ref(th, -1, "decrement ref from iterator");
}
+ ao2_iterator_destroy(&i);
return CLI_SUCCESS;
#undef FORMAT
@@ -22934,7 +22935,7 @@ static int sip_prepare_socket(struct sip_pvt *p)
{
struct sip_socket *s = &p->socket;
static const char name[] = "SIP socket";
- struct sip_threadinfo *th;
+ struct sip_threadinfo *th = NULL;
struct ast_tcptls_session_instance *tcptls_session;
struct ast_tcptls_session_args tmp_ca = {
.name = name,