]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix mem corruption on failed register
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 21:41:42 +0000 (21:41 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 21:41:42 +0000 (21:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13229 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index 644926e8d0d25bcffd7435f1a020140900124a24..777707e5f5a06ac1f97651b058391c4842156ffa 100644 (file)
@@ -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);
-                       }
-               }
        }
 }