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

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


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

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/91/4791/1

diff --git a/res/stasis/stasis_bridge.c b/res/stasis/stasis_bridge.c
index 95e549a..104d319 100644
--- a/res/stasis/stasis_bridge.c
+++ b/res/stasis/stasis_bridge.c
@@ -215,6 +215,7 @@
 		 */
 		return -1;
 	}
+	ao2_cleanup(control);
 
 	/*
 	 * If going into a holding bridge, default the role to participant, if
@@ -234,7 +235,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/4791
To unsubscribe, visit https://gerrit.asterisk.org/settings

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



More information about the asterisk-code-review mailing list