]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_conference] Avoid race conditions touching conference->variables without a mutex. master
authorAdnan Elezovic <adnanel94@gmail.com>
Thu, 14 Aug 2025 09:27:28 +0000 (11:27 +0200)
committerGitHub <noreply@github.com>
Thu, 14 Aug 2025 09:27:28 +0000 (12:27 +0300)
Co-authored-by: aelezovic <adnan.elezovic@infobip.com>
src/mod/applications/mod_conference/conference_event.c

index a88a5feab9b79b67bc3fe257b9d01754b3fdebd9..ec3c9b4799c6d2dd0a9f92417261bf2d3a218061 100644 (file)
@@ -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;
 }