[asterisk-commits] file: branch 1.2 r47855 -
/branches/1.2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 20 09:16:22 MST 2006
Author: file
Date: Mon Nov 20 10:16:22 2006
New Revision: 47855
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47855
Log:
Free history items at the end of use of the temporary SIP pvt structure. (issue #8383 reported by benh)
Modified:
branches/1.2/channels/chan_sip.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=47855&r1=47854&r2=47855
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Mon Nov 20 10:16:22 2006
@@ -4297,6 +4297,7 @@
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));
@@ -4321,6 +4322,11 @@
ast_copy_string(p->callid, callid, sizeof(p->callid));
__transmit_response(p, msg, req, 0);
+
+ while ((hist = p->history)) {
+ p->history = p->history->next;
+ free(hist);
+ }
return 0;
}
More information about the asterisk-commits
mailing list