mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-15 14:36:45 +00:00
[libesl] Coverity 1546296 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
e75944ac51
commit
304d5352af
@ -1531,11 +1531,15 @@ ESL_DECLARE(esl_status_t) esl_send_recv_timed(esl_handle_t *handle, const char *
|
|||||||
const char *hval;
|
const char *hval;
|
||||||
esl_status_t status;
|
esl_status_t status;
|
||||||
|
|
||||||
if (!handle || !handle->connected || handle->sock == ESL_SOCK_INVALID) {
|
if (!handle) {
|
||||||
return ESL_FAIL;
|
return ESL_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
esl_mutex_lock(handle->mutex);
|
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);
|
esl_event_safe_destroy(&handle->last_sr_event);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user