Free history items at the end of use of the temporary SIP pvt structure. (issue #8383 reported by benh)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2
Joshua Colp 19 years ago
parent 0b9a8ee148
commit fea6c62d61

@ -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;
}

Loading…
Cancel
Save