mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 01:06:00 +00:00
[libesl] Coverity 1589045 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
47a8b48ce6
commit
a396dc8789
@ -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->info_event);
|
||||
|
||||
if (mutex) {
|
||||
esl_mutex_unlock(mutex);
|
||||
esl_mutex_lock(mutex);
|
||||
esl_mutex_unlock(mutex);
|
||||
esl_mutex_destroy(&mutex);
|
||||
}
|
||||
|
||||
if (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));
|
||||
handle->destroyed = 1;
|
||||
|
||||
if (mutex) {
|
||||
esl_mutex_unlock(mutex);
|
||||
esl_mutex_lock(mutex);
|
||||
esl_mutex_unlock(mutex);
|
||||
esl_mutex_destroy(&mutex);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user