diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-10-28 16:40:59 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-10-28 16:40:59 +0000 |
commit | 294ff8315261786677d5793e84dcfa7e8f69ed46 (patch) | |
tree | f7c0f016f334ccfc370a745f1f18e133776e61f3 /main | |
parent | 221dcb133580fc78719535345fe6a76f9a840d16 (diff) |
main/bridge: Destroy features struct on off nominal path during bridge impart
When a channel is imparted to a bridge, the invocation of the function may
provide an ast_bridge_features struct. Upon passing this to ast_bridge_impart,
the caller must assume that ownership has passed to the function, as in all
paths the function destroys the struct prior to returning (as its purpose is
to configure the behavior of the channel while in the bridge). On one off
nominal path - where the channel already has a PBX thread - the struct was not
being destroyed.
This patch fixes that glitch.
ASTERISK-24437 #close
Reported by: Scott Griepentrog
........
Merged revisions 426431 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@426432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/bridge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/bridge.c b/main/bridge.c index ab3bb17e6..de5566244 100644 --- a/main/bridge.c +++ b/main/bridge.c @@ -1677,6 +1677,7 @@ int ast_bridge_impart(struct ast_bridge *bridge, if (ast_channel_pbx(chan)) { ast_log(AST_LOG_WARNING, "Channel %s has a PBX thread and cannot be imparted into bridge %s\n", ast_channel_name(chan), bridge->uniqueid); + ast_bridge_features_destroy(features); return -1; } |