]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
only close inner file handle if it was initilized
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 17 Aug 2011 23:10:44 +0000 (18:10 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 17 Aug 2011 23:10:44 +0000 (18:10 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index 39e6380399f0e1def92e195d6412a69afb72e86a..8c260ddf7fefb188f4ab894fcb5f9711aa2aa8da 100755 (executable)
@@ -3669,7 +3669,9 @@ static switch_status_t file_string_file_close(switch_file_handle_t *handle)
 {
        file_string_context_t *context = handle->private_info;
 
-       switch_core_file_close(&context->fh);
+       if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
+               switch_core_file_close(&context->fh);
+       }
 
        return SWITCH_STATUS_SUCCESS;
 }