]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10473: [freeswitch-core] FreeSWITCH crash - Null event pointer dereference during...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Jul 2017 19:39:24 +0000 (14:39 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Jul 2017 19:39:24 +0000 (14:39 -0500)
src/mod/applications/mod_conference/mod_conference.c

index 3920c766ce1077b26928d49a5993ce32a35d0a24..a43a1eeb5d8d4a679ec68dc991847ded9a42a1b6 100644 (file)
@@ -747,12 +747,6 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
        conference_file_stop(conference, FILE_STOP_ASYNC);
        conference_file_stop(conference, FILE_STOP_ALL);
 
-       for (np = conference->cdr_nodes; np; np = np->next) {
-               if (np->var_event) {
-                       switch_event_destroy(&np->var_event);
-               }
-       }
-
        switch_mutex_lock(conference->member_mutex);
        for (imember = conference->members; imember; imember = imember->next) {
                switch_channel_t *channel;
@@ -831,9 +825,17 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
        conference_event_add_data(conference, event);
        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "conference-destroy");
        switch_event_fire(&event);
-
+       
+       switch_mutex_lock(conference->member_mutex);
        conference_cdr_render(conference);
 
+       for (np = conference->cdr_nodes; np; np = np->next) {
+               if (np->var_event) {
+                       switch_event_destroy(&np->var_event);
+               }
+       }
+       switch_mutex_unlock(conference->member_mutex);
+
        switch_mutex_lock(conference_globals.setup_mutex);
        if (conference->layout_hash) {
                switch_core_hash_destroy(&conference->layout_hash);