[mod_erlang_event] Fix segfault in destroy_listener()

This commit is contained in:
VCC Live/Core 2020-04-24 22:49:07 +02:00 committed by Andrey Volk
parent b847935ce2
commit 2d6e2e2fa3
1 changed files with 1 additions and 2 deletions

View File

@ -1401,7 +1401,6 @@ void destroy_listener(listener_t * listener)
switch_mutex_unlock(listener->sock_mutex);
switch_core_hash_destroy(&listener->event_hash);
switch_core_hash_destroy(&listener->sessions);
/* remove any bindings for this connection */
remove_binding(listener, NULL);
@ -1414,6 +1413,7 @@ void destroy_listener(listener_t * listener)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Orphaning call %s\n", s->uuid_str);
destroy_session_elem(s);
}
switch_core_hash_destroy(&listener->sessions);
switch_thread_rwlock_unlock(listener->session_rwlock);
switch_thread_rwlock_unlock(listener->rwlock);
@ -1421,7 +1421,6 @@ void destroy_listener(listener_t * listener)
switch_memory_pool_t *pool = listener->pool;
switch_core_destroy_memory_pool(&pool);
}
}
static switch_status_t state_handler(switch_core_session_t *session)