From: Anthony Minessale Date: Mon, 4 May 2009 21:41:42 +0000 (+0000) Subject: fix mem corruption on failed register X-Git-Tag: v1.0.4~971 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d548de40ccb1965beb32f6d857f1cd75f00c3eef;p=thirdparty%2Ffreeswitch.git fix mem corruption on failed register git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13229 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 644926e8d0..777707e5f5 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -1385,23 +1385,6 @@ void sofia_reg_handle_sip_r_register(int status, if (ostate != sofia_private->gateway->state) { sofia_reg_fire_custom_gateway_state_event(sofia_private->gateway); } - - - if (status >= 300) { - if (sofia_private) { - if (sofia_private->gateway) { - nua_handle_destroy(sofia_private->gateway->nh); - sofia_private->gateway->nh = NULL; - nua_handle_bind(sofia_private->gateway->nh, NULL); - sofia_private->gateway->sofia_private = NULL; - } else { - nua_handle_destroy(nh); - } - sofia_private_free(sofia_private); - } else { - nua_handle_destroy(nh); - } - } } }