From: Adnan Elezovic Date: Thu, 14 Aug 2025 09:27:28 +0000 (+0200) Subject: [mod_conference] Avoid race conditions touching conference->variables without a mutex. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=HEAD;p=thirdparty%2Ffreeswitch.git [mod_conference] Avoid race conditions touching conference->variables without a mutex. Co-authored-by: aelezovic --- 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; }