[Asterisk-code-review] stasis bridge.c: Fix off-nominal stasis control ref leak. (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Tue Jan 24 13:59:20 CST 2017


Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/4790 )

Change subject: stasis_bridge.c: Fix off-nominal stasis control ref leak.
......................................................................

stasis_bridge.c: Fix off-nominal stasis control ref leak.

Change-Id: Ib17218343a6596832060180e19386da9df150ac8
---
M res/stasis/stasis_bridge.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/4790/1

diff --git a/res/stasis/stasis_bridge.c b/res/stasis/stasis_bridge.c
index aa21ec2..549c39d 100644
--- a/res/stasis/stasis_bridge.c
+++ b/res/stasis/stasis_bridge.c
@@ -217,6 +217,7 @@
 		 */
 		return -1;
 	}
+	ao2_cleanup(control);
 
 	/*
 	 * If going into a holding bridge, default the role to participant, if
@@ -236,7 +237,6 @@
 		}
 	}
 
-	ao2_cleanup(control);
 	if (self->allowed_capabilities & STASIS_BRIDGE_MIXING_CAPABILITIES) {
 		ast_bridge_channel_update_linkedids(bridge_channel, swap);
 		if (ast_test_flag(&self->feature_flags, AST_BRIDGE_FLAG_SMART)) {

-- 
To view, visit https://gerrit.asterisk.org/4790
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib17218343a6596832060180e19386da9df150ac8
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list