[Asterisk-code-review] bridge: Old channel video source not set to NULL after unref. (asterisk[13])
Jenkins2
asteriskteam at digium.com
Thu Dec 21 05:47:18 CST 2017
Jenkins2 has submitted this change and it was merged. ( 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(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
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: merged
Gerrit-Change-Id: Ib2dab61677dd8a21f7ad53cdc9b8ca93297838b3
Gerrit-Change-Number: 7678
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171221/ec73371c/attachment.html>
More information about the asterisk-code-review
mailing list