From: Dragos Oancea Date: Mon, 11 Nov 2019 23:18:23 +0000 (+0000) Subject: [core] Do not try to close a file handle if it's not SWITCH_FILE_OPEN, return SWITCH_... X-Git-Tag: v1.10.2^2~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2b46bcf109d92e97b925aebeeea4d13a99e6267;p=thirdparty%2Ffreeswitch.git [core] Do not try to close a file handle if it's not SWITCH_FILE_OPEN, return SWITCH_STATUS_FALSE instead --- diff --git a/src/switch_core_file.c b/src/switch_core_file.c index a009f5b19b..c49b151b01 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -929,6 +929,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh) if (switch_test_flag(fh, SWITCH_FILE_OPEN)) { status = switch_core_file_pre_close(fh); + } else { + return SWITCH_STATUS_FALSE; } fh->file_interface->file_close(fh);