[asterisk-commits] rizzo: branch rizzo/astobj2 r47936 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 22 10:54:58 MST 2006


Author: rizzo
Date: Wed Nov 22 11:54:57 2006
New Revision: 47936

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47936
Log:
do not leak sip_registry entries on a 'sip reload'


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47936&r1=47935&r2=47936
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Wed Nov 22 11:54:57 2006
@@ -1757,6 +1757,13 @@
 
 static void registry_destroy_all(void)
 {
+	/* because these entries have a reference for the scheduled events,
+	 * we need to remove them before doing the DESTROYALL
+	 */
+	ASTOBJ_CONTAINER_TRAVERSE(&regl,1, do {
+		unref_registry(iterator);
+	} while (0));
+
 	ASTOBJ_CONTAINER_DESTROYALL(&regl, sip_registry_destroy);
 	if (option_debug > 3)
 		ast_log(LOG_DEBUG, "--------------- Done destroying registry list\n");



More information about the asterisk-commits mailing list