mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +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:
@@ -199,7 +199,6 @@ int conf_announce_channel_push(struct ast_channel *ast)
|
||||
/* Impart the output channel into the bridge */
|
||||
if (ast_bridge_impart(p->bridge, chan, NULL, features,
|
||||
AST_BRIDGE_IMPART_CHAN_DEPARTABLE)) {
|
||||
ast_bridge_features_destroy(features);
|
||||
ast_channel_unref(chan);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user