1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Fix: Corrected locking for recursive event_release()

This commit is contained in:
Philipp Schafft 2018-10-26 08:09:09 +00:00
parent a192f696c3
commit 30c8df8aba

View File

@ -43,6 +43,7 @@ static void event_addref(event_t *event) {
static void event_release(event_t *event) {
size_t i;
event_t *to_free;
if (!event)
return;
@ -63,10 +64,12 @@ static void event_release(event_t *event) {
free(event->client_role);
free(event->client_username);
free(event->client_useragent);
event_release(event->next);
to_free = event->next;
free(event);
thread_mutex_unlock(&event_lock);
if (to_free)
event_release(to_free);
}
static void event_push(event_t **event, event_t *next) {