From 00d1a79d084b85341c3b1edd9da7b8ff1d616148 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Jul 2017 18:11:31 -0500 Subject: [PATCH] FS-10472: [mod_conference] Invalid free in personal canvas mode #resolve --- src/mod/applications/mod_conference/conference_video.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 70d3cfbe65..b3a5fb9d55 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -3466,7 +3466,14 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr } if (imember->session && switch_core_session_media_flow(imember->session, SWITCH_MEDIA_TYPE_VIDEO) != SWITCH_MEDIA_FLOW_SENDONLY && switch_core_session_media_flow(imember->session, SWITCH_MEDIA_TYPE_VIDEO) != SWITCH_MEDIA_FLOW_INACTIVE) { - conference_video_pop_next_image(imember, &imember->pcanvas_img); + switch_image_t *next_img = NULL; + + conference_video_pop_next_image(imember, &next_img); + + if (next_img) { + switch_img_free(&imember->pcanvas_img); + imember->pcanvas_img = next_img; + } } if (imember->session) {