]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10734: [mod_conference] Fix deadlock on hangup race #resolve
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Oct 2017 18:24:40 +0000 (13:24 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Oct 2017 18:25:35 +0000 (13:25 -0500)
src/mod/applications/mod_conference/conference_video.c

index 03b7866c3630178824b37314ad0266c3dfae1388..8daf4108e49e627a70417e52f2613f568045a9a0 100644 (file)
@@ -3149,7 +3149,9 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
                                        write_frame.packetlen = 0;
 
                                        if (imember->mux_out_queue && switch_frame_buffer_dup(imember->fb, &write_frame, &dupframe) == SWITCH_STATUS_SUCCESS) {
-                                               switch_queue_push(imember->mux_out_queue, dupframe);
+                                               if (switch_queue_trypush(imember->mux_out_queue, dupframe) != SWITCH_STATUS_SUCCESS) {
+                                                       switch_frame_buffer_free(imember->fb, &dupframe);
+                                               }
                                                dupframe = NULL;
                                        }
                                }