[asterisk-commits] russell: trunk r45624 - in /trunk: ./
channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Oct 18 18:04:19 MST 2006
Author: russell
Date: Wed Oct 18 20:04:18 2006
New Revision: 45624
URL: http://svn.digium.com/view/asterisk?rev=45624&view=rev
Log:
Merge fix to not leak the stringfields of a thread speicif sip_pvt. This also
includes the fix not to leak the actual sip_pvt.
Merged revisions 45622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r45622 | russell | 2006-10-18 20:59:51 -0400 (Wed, 18 Oct 2006) | 2 lines
Don't leak the actual thread-specific sip_pvt struct
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=45624&r1=45623&r2=45624&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Oct 18 20:04:18 2006
@@ -1142,8 +1142,10 @@
int recheck;
} regl;
+static void temp_pvt_cleanup(void *);
+
/*! \brief A per-thread temporary pvt structure */
-AST_THREADSTORAGE(ts_temp_pvt);
+AST_THREADSTORAGE_CUSTOM(ts_temp_pvt, NULL, temp_pvt_cleanup);
/*! \todo Move the sip_auth list to AST_LIST */
static struct sip_auth *authl = NULL; /*!< Authentication list for realm authentication */
@@ -5528,6 +5530,15 @@
add_header(&resp, "X-Asterisk-HangupCauseCode", buf);
}
return send_response(p, &resp, reliable, seqno);
+}
+
+static void temp_pvt_cleanup(void *data)
+{
+ struct sip_pvt *p = data;
+
+ ast_string_field_free_pools(p);
+
+ free(data);
}
/*! \brief Transmit response, no retransmits, using a temporary pvt structure */
More information about the asterisk-commits
mailing list