fix mem corruption on failed register

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13229 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-05-04 21:41:42 +00:00
parent affd0c8446
commit d548de40cc
1 changed files with 0 additions and 17 deletions

View 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);
}
}
}
}