From: Anthony Minessale Date: Wed, 5 Jul 2017 23:11:31 +0000 (-0500) Subject: FS-10472: [mod_conference] Invalid free in personal canvas mode #resolve X-Git-Tag: v1.6.19~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b875c332100cb79fc4338d9be01a4fa5108ee9c;p=thirdparty%2Ffreeswitch.git FS-10472: [mod_conference] Invalid free in personal canvas mode #resolve --- diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 9b1a6d76c1..548a60b94a 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -2849,7 +2849,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) {