[Asterisk-code-review] bridge softmix: Fix memory leaks. (asterisk[15])
Corey Farrell
asteriskteam at digium.com
Mon Dec 18 18:40:56 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7642
Change subject: bridge_softmix: Fix memory leaks.
......................................................................
bridge_softmix: Fix memory leaks.
Change-Id: Ifaf3e93b398595d21d07f535330fef77ff15a80c
---
M bridges/bridge_softmix.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/42/7642/1
diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index 8de88f2..6460a6e 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -672,6 +672,7 @@
ast_log(LOG_ERROR, "Bridge %s: Failed to join channel %s. "
"Could not allocate enough memory.\n", bridge->uniqueid,
ast_channel_name(bridge_channel->chan));
+ ast_free(sc);
return -1;
}
}
@@ -1306,6 +1307,8 @@
ast_log(LOG_NOTICE, "Failed to re-allocate softmix mixing structure.\n");
return -1;
}
+ mixing_array->buffers = tmp;
+
if (binaural_active) {
struct convolve_channel_pair **tmp2;
if (!(tmp2 = ast_realloc(mixing_array->chan_pairs,
@@ -1315,7 +1318,6 @@
}
mixing_array->chan_pairs = tmp2;
}
- mixing_array->buffers = tmp;
return 0;
}
--
To view, visit https://gerrit.asterisk.org/7642
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifaf3e93b398595d21d07f535330fef77ff15a80c
Gerrit-Change-Number: 7642
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/20171218/c187dbf0/attachment.html>
More information about the asterisk-code-review
mailing list