diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 16:16:22 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-20 16:16:22 +0000 |
commit | 42b10fd706db91e790f760f4ac0176d7fea51881 (patch) | |
tree | 8cd4f33aa92358115e3c231ccd6ef12c9ca5e9fd /channels/chan_sip.c | |
parent | 542c486d17efde2300480a14c3b0af3d85ce9724 (diff) |
Free history items at the end of use of the temporary SIP pvt structure. (issue #8383 reported by benh)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@47855 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e90e96362..e6ef035d5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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; } |