[Asterisk-code-review] bridge: Old channel video source not set to NULL after unref. (asterisk[13])
Corey Farrell
asteriskteam at digium.com
Wed Dec 20 10:26:39 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7678
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/78/7678/1
diff --git a/main/bridge.c b/main/bridge.c
index 5e065fb..8284fd3 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -3808,7 +3808,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/7678
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2dab61677dd8a21f7ad53cdc9b8ca93297838b3
Gerrit-Change-Number: 7678
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/c76ef45b/attachment.html>
More information about the asterisk-code-review
mailing list