fix crash on chan open failure

This commit is contained in:
Mathieu Rene 2012-07-25 20:04:35 -04:00
parent 5284f5d134
commit 706c662f4b
1 changed files with 2 additions and 2 deletions

View File

@ -270,9 +270,9 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
if (tech_pvt->write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->write_codec);
}
ftdm_channel_close(&tech_pvt->ftdm_channel);
}
ftdm_channel_close(&tech_pvt->ftdm_channel);
return SWITCH_STATUS_SUCCESS;
}