[Freeswitch-svn] [commit] r13195 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN anthm at freeswitch.org
Wed Apr 29 12:05:51 PDT 2009


Author: anthm
Date: Wed Apr 29 14:05:51 2009
New Revision: 13195

Log:
prevent double free

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Wed Apr 29 14:05:51 2009
@@ -262,10 +262,9 @@
 	
  end:
 	
-	if (sub_state == nua_substate_terminated) {
-		sofia_private_free(sofia_private);
-		nua_handle_bind(nh, NULL);
-		nua_handle_destroy(nh);
+	if (sub_state == nua_substate_terminated && sofia_private != &mod_sofia_globals.destroy_private) {
+		sofia_private->destroy_nh = 1;
+		sofia_private->destroy_me = 1;
 	}
 
 }



More information about the Freeswitch-svn mailing list