[Asterisk-code-review] bridge: Old channel video source not set to NULL after unref. (asterisk[15])

Corey Farrell asteriskteam at digium.com
Wed Dec 20 10:26:31 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7677


Change subject: bridge: Old channel video source not set to NULL after unref.
......................................................................

bridge: Old channel video source not set to NULL after unref.

The bridge holds onto the old channel video source after it's been
released.  This can lead to use after free errors.

ASTERISK-27229 #close

Change-Id: Ib2dab61677dd8a21f7ad53cdc9b8ca93297838b3
---
M main/bridge.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/7677/1

diff --git a/main/bridge.c b/main/bridge.c
index 7a937ea..88d9e54 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -3848,7 +3848,7 @@
 		data->average_talking_energy = talker_energy;
 	} else if ((data->average_talking_energy < talker_energy) && is_keyframe) {
 		if (data->chan_old_vsrc) {
-			ast_channel_unref(data->chan_old_vsrc);
+			data->chan_old_vsrc = ast_channel_unref(data->chan_old_vsrc);
 		}
 		if (data->chan_vsrc) {
 			data->chan_old_vsrc = data->chan_vsrc;

-- 
To view, visit https://gerrit.asterisk.org/7677
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2dab61677dd8a21f7ad53cdc9b8ca93297838b3
Gerrit-Change-Number: 7677
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171220/a1a239b3/attachment.html>


More information about the asterisk-code-review mailing list