mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 21:44:51 +00:00
[core] Do not try to close a file handle if it's not SWITCH_FILE_OPEN, return SWITCH_STATUS_FALSE instead
This commit is contained in:
parent
a288c3d969
commit
a2b46bcf10
@ -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)) {
|
if (switch_test_flag(fh, SWITCH_FILE_OPEN)) {
|
||||||
status = switch_core_file_pre_close(fh);
|
status = switch_core_file_pre_close(fh);
|
||||||
|
} else {
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fh->file_interface->file_close(fh);
|
fh->file_interface->file_close(fh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user