From: Anthony Minessale Date: Wed, 17 Aug 2011 23:10:44 +0000 (-0500) Subject: only close inner file handle if it was initilized X-Git-Tag: v1.2-rc1~51^2~266^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30d7ad878c10975ced8f9eb7024599cd6bc017d6;p=thirdparty%2Ffreeswitch.git only close inner file handle if it was initilized --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 39e6380399..8c260ddf7f 100755 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -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; }