From d22aec67c66aed6630787adb262d631e2cefb0e4 Mon Sep 17 00:00:00 2001 From: Adnan Elezovic Date: Thu, 14 Aug 2025 11:27:28 +0200 Subject: [PATCH] [mod_conference] Avoid race conditions touching conference->variables without a mutex. Co-authored-by: aelezovic --- src/mod/applications/mod_conference/conference_event.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/applications/mod_conference/conference_event.c b/src/mod/applications/mod_conference/conference_event.c index a88a5feab9..ec3c9b4799 100644 --- a/src/mod/applications/mod_conference/conference_event.c +++ b/src/mod/applications/mod_conference/conference_event.c @@ -748,7 +748,9 @@ switch_status_t conference_event_add_data(conference_obj_t *conference, switch_e switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Ghosts", "%u", conference->count_ghosts); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", conference->profile_name); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Unique-ID", conference->uuid_str); + switch_mutex_lock(conference->flag_mutex); switch_event_merge(event, conference->variables); + switch_mutex_unlock(conference->flag_mutex); return status; } -- 2.47.2