mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
[libesl] Coverity 1546296 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
8cfde8ad3c
commit
98a3749c10
@ -1531,11 +1531,15 @@ ESL_DECLARE(esl_status_t) esl_send_recv_timed(esl_handle_t *handle, const char *
|
||||
const char *hval;
|
||||
esl_status_t status;
|
||||
|
||||
if (!handle || !handle->connected || handle->sock == ESL_SOCK_INVALID) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
if (!handle) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
esl_mutex_lock(handle->mutex);
|
||||
if (!handle->connected || handle->sock == ESL_SOCK_INVALID) {
|
||||
esl_mutex_unlock(handle->mutex);
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
esl_event_safe_destroy(&handle->last_sr_event);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user