diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-23 15:22:35 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-23 15:22:35 +0000 |
commit | 4ba5b7c17f0d218c645c9f0fbfdba1ccf9e026a1 (patch) | |
tree | a3f4c15ea7413456772da824f87a70a86e7ba4d3 /channels | |
parent | bffcd79a2b620a8b30f80174b677be9e4dbabbb7 (diff) |
Fix more memory leaks that may result if rtp is not successfully allocated.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@202601 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 99b3d4f3c..0b0650e30 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4604,11 +4604,15 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si if (p->rtp) { ast_rtp_destroy(p->rtp); } + if (p->udptl) { + ast_udptl_destroy(p->udptl); + } ast_mutex_destroy(&p->lock); if (p->chanvars) { ast_variables_destroy(p->chanvars); p->chanvars = NULL; } + ast_string_field_free_memory(p); free(p); return NULL; } |