mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-15 14:36:45 +00:00
[libesl] Coverity 1589045 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
304d5352af
commit
29d6c43a3f
@ -1167,13 +1167,6 @@ ESL_DECLARE(esl_status_t) esl_disconnect(esl_handle_t *handle)
|
|||||||
esl_event_safe_destroy(&handle->last_ievent);
|
esl_event_safe_destroy(&handle->last_ievent);
|
||||||
esl_event_safe_destroy(&handle->info_event);
|
esl_event_safe_destroy(&handle->info_event);
|
||||||
|
|
||||||
if (mutex) {
|
|
||||||
esl_mutex_unlock(mutex);
|
|
||||||
esl_mutex_lock(mutex);
|
|
||||||
esl_mutex_unlock(mutex);
|
|
||||||
esl_mutex_destroy(&mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (handle->packet_buf) {
|
if (handle->packet_buf) {
|
||||||
esl_buffer_destroy(&handle->packet_buf);
|
esl_buffer_destroy(&handle->packet_buf);
|
||||||
}
|
}
|
||||||
@ -1181,6 +1174,13 @@ ESL_DECLARE(esl_status_t) esl_disconnect(esl_handle_t *handle)
|
|||||||
memset(handle, 0, sizeof(*handle));
|
memset(handle, 0, sizeof(*handle));
|
||||||
handle->destroyed = 1;
|
handle->destroyed = 1;
|
||||||
|
|
||||||
|
if (mutex) {
|
||||||
|
esl_mutex_unlock(mutex);
|
||||||
|
esl_mutex_lock(mutex);
|
||||||
|
esl_mutex_unlock(mutex);
|
||||||
|
esl_mutex_destroy(&mutex);
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user