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

FreeSWITCH SVN brian at freeswitch.org
Thu Jun 4 07:10:32 PDT 2009


Author: brian
Date: Thu Jun  4 09:10:31 2009
New Revision: 13612

Log:
dont leak this in other cases. 

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

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Thu Jun  4 09:10:31 2009
@@ -342,10 +342,7 @@
 							   NUTAG_OUTBOUND("no-options-keepalive"), NUTAG_OUTBOUND("no-validate"), NUTAG_KEEPALIVE(0), TAG_NULL());
 			}
 			gateway_ptr->retry = now + gateway_ptr->retry_seconds;
-			gateway_ptr->state = REG_STATE_TRYING;
-			
-			switch_safe_free(user_via);
-			
+			gateway_ptr->state = REG_STATE_TRYING;			
 			break;
 
 		case REG_STATE_FAILED:
@@ -374,6 +371,7 @@
 		if (ostate != gateway_ptr->state) {
 			sofia_reg_fire_custom_gateway_state_event(gateway_ptr);
 		}
+		switch_safe_free(user_via);
 	}
 }
 



More information about the Freeswitch-svn mailing list