mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user