[Asterisk-code-review] bridge softmix: Fix leak on ast stream topology set stream f... (asterisk[15])
Corey Farrell
asteriskteam at digium.com
Tue Nov 7 11:49:54 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7106
Change subject: bridge_softmix: Fix leak on ast_stream_topology_set_stream failure.
......................................................................
bridge_softmix: Fix leak on ast_stream_topology_set_stream failure.
Change-Id: I91d25704859efbe50b8b82cfe1cd3c40ba177c9f
---
M bridges/bridge_softmix.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/7106/1
diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index f490967..ea4f198 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -541,7 +541,10 @@
dest_index++;
if (ast_stream_get_state(stream) == AST_STREAM_STATE_REMOVED) {
- ast_stream_topology_set_stream(dest, dest_index - 1, clone);
+ if (ast_stream_topology_set_stream(dest, dest_index - 1, clone)) {
+ ast_stream_free(clone);
+ return -1;
+ }
added = 1;
break;
}
--
To view, visit https://gerrit.asterisk.org/7106
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d25704859efbe50b8b82cfe1cd3c40ba177c9f
Gerrit-Change-Number: 7106
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/20171107/c8effc1d/attachment.html>
More information about the asterisk-code-review
mailing list