]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix more memory leaks that may result if rtp is not successfully allocated.
authorMark Michelson <mmichelson@digium.com>
Tue, 23 Jun 2009 15:22:35 +0000 (15:22 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 23 Jun 2009 15:22:35 +0000 (15:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@202601 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 99b3d4f3c35c78d2c0ccb0ed4c57b8e1d87bc0e0..0b0650e3053d2a5afdeec24c5ba189ad786d0f52 100644 (file)
@@ -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;
                }