mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 19:16:46 +00:00
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:
@@ -808,7 +808,6 @@ int ast_unreal_channel_push_to_bridge(struct ast_channel *ast, struct ast_bridge
|
||||
/* Impart the semi2 channel into the bridge */
|
||||
if (ast_bridge_impart(bridge, chan, NULL, features,
|
||||
AST_BRIDGE_IMPART_CHAN_INDEPENDENT)) {
|
||||
ast_bridge_features_destroy(features);
|
||||
ast_channel_unref(chan);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user