]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Jun 2007 14:59:05 +0000 (14:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 27 Jun 2007 14:59:05 +0000 (14:59 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@297 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/zap_io.c

index 477bc8f04f1abcbf07cecf22da7654f657c33066..4ebaaa6bc86047765e33ce67778f2d84fc7c29f3 100644 (file)
@@ -215,7 +215,7 @@ static zap_status_t zap_channel_destroy(zap_channel_t *zchan)
 {
 
        if (zap_test_flag(zchan, ZAP_CHANNEL_CONFIGURED)) {
-               zap_mutex_destroy(&zchan->mutex);
+
                zap_buffer_destroy(&zchan->digit_buffer);
                zap_buffer_destroy(&zchan->dtmf_buffer);
                zap_buffer_destroy(&zchan->fsk_buffer);
@@ -234,6 +234,8 @@ static zap_status_t zap_channel_destroy(zap_channel_t *zchan)
                                zap_log(ZAP_LOG_ERROR, "Error Closing channel %u:%u fd:%d\n", zchan->span_id, zchan->chan_id, zchan->sockfd);
                        }
                }
+
+               zap_mutex_destroy(&zchan->mutex);
        }
        
        return ZAP_SUCCESS;