Bridge system: Fix memory leaks and double frees on impart failure.

You cannot reference the passed in features struct after calling
ast_bridge_impart().  Even if the call fails.

Change-Id: I902b88ba0d5d39520e670fb635078a367268ea21
This commit is contained in:
Richard Mudgett
2016-04-13 13:50:04 -05:00
parent 71dfa35540
commit a63656b419
5 changed files with 12 additions and 7 deletions

View File

@@ -1103,7 +1103,6 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
xfer_cfg ? xfer_cfg->xfersound : NULL);
ao2_cleanup(xfer_cfg);
if (bridge_add_failed) {
ast_bridge_features_destroy(peer_features);
ast_bridge_features_cleanup(&chan_features);
ast_bridge_destroy(bridge, 0);
goto done;