]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Free history items at the end of use of the temporary SIP pvt structure. (issue ...
authorJoshua Colp <jcolp@digium.com>
Mon, 20 Nov 2006 16:16:22 +0000 (16:16 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 20 Nov 2006 16:16:22 +0000 (16:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47855 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index e90e96362c43cde93dc723939744d57def53d544..e6ef035d555114b72a6c62c446ee1ce4bb768bf7 100644 (file)
@@ -4297,6 +4297,7 @@ static int __transmit_response(struct sip_pvt *p, char *msg, struct sip_request
 static int transmit_response_using_temp(char *callid, struct sockaddr_in *sin, int useglobal_nat, const int intended_method, struct sip_request *req, char *msg)
 {
        struct sip_pvt *p = alloca(sizeof(*p));
+       struct sip_history *hist = NULL;
 
        memset(p, 0, sizeof(*p));
 
@@ -4322,6 +4323,11 @@ static int transmit_response_using_temp(char *callid, struct sockaddr_in *sin, i
 
        __transmit_response(p, msg, req, 0);
 
+       while ((hist = p->history)) {
+               p->history = p->history->next;
+               free(hist);
+       }
+
        return 0;
 }