]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/bridge_channel: Fix channel reference leak on video source 06/4306/1
authorMatt Jordan <mjordan@digium.com>
Fri, 4 Nov 2016 20:37:57 +0000 (15:37 -0500)
committerMatt Jordan <mjordan@digium.com>
Fri, 4 Nov 2016 20:47:42 +0000 (15:47 -0500)
commit62d60c1f5849a2c4adeafe6be5eccd4fd4ef69d3
treec04cba76e6f0d11427b5200ba8aecff92ccbaca2
parentbe254aa8e34494c44e1f37ae96d6446fa473e22a
main/bridge_channel: Fix channel reference leak on video source

When a channel is made the video source, the bridge holds a reference to
it. Whenever the video source changes, that reference is released.
However, a ref leak does occur if the channel leaves the bridge (such as
being hung up) while it is the video source, as the bridge never
releases the ref in such a case.

This patch adds a line to the bridge_channel_internal_join routine such
that, when a channel finishes its time in the bridge, it notifies the
bridge via ast_bridge_remove_video_src that if it is a video source its
reference should be released.

ASTERISK-26555 #close

Change-Id: I3a2f5238a9d2fc49c591f0e65199d782ab0be76a
main/bridge_channel.c