diff options
author | George Joseph <gjoseph@digium.com> | 2017-12-19 09:51:25 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-19 09:51:25 -0600 |
commit | d68482fce2578dfcc7e0aaa0324238b0d1438603 (patch) | |
tree | 15b751bd9496ec84d1d6e11f20799d222f984d68 | |
parent | 11a1e07ad291df072bccc9896f4d90efd056c1f8 (diff) | |
parent | 91d9eae79b0e0e17b259689c93749c4770b54ea7 (diff) |
Merge "bridge_softmix: Fix memory leaks."
-rw-r--r-- | bridges/bridge_softmix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c index 8de88f257..6460a6ea2 100644 --- a/bridges/bridge_softmix.c +++ b/bridges/bridge_softmix.c @@ -672,6 +672,7 @@ static int softmix_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chan 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 @@ static int softmix_mixing_array_grow(struct softmix_mixing_array *mixing_array, 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 @@ static int softmix_mixing_array_grow(struct softmix_mixing_array *mixing_array, } mixing_array->chan_pairs = tmp2; } - mixing_array->buffers = tmp; return 0; } |