[Asterisk-code-review] chan vpb.cc: Fix compiler warning Jenkins found. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Jul 1 17:28:08 CDT 2015


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/757

Change subject: chan_vpb.cc: Fix compiler warning Jenkins found.
......................................................................

chan_vpb.cc: Fix compiler warning Jenkins found.

Change-Id: I0ec7fd10d56d90d5a60b12b5a7d6807f265ac5e0
---
M channels/chan_vpb.cc
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/57/757/1

diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index 181e50a..f1ed392 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -2626,14 +2626,13 @@
 
 	if (bridges) {
 		ast_mutex_lock(&bridge_lock);
-		memset(bridges, 0, sizeof bridges);
-		ast_mutex_unlock(&bridge_lock);
-		ast_mutex_destroy(&bridge_lock);
 		for (int i = 0; i < max_bridges; i++) {
 			ast_mutex_destroy(&bridges[i].lock);
 			ast_cond_destroy(&bridges[i].cond);
 		}
 		ast_free(bridges);
+		bridges = NULL;
+		ast_mutex_unlock(&bridge_lock);
 	}
 
 	ao2_cleanup(vpb_tech.capabilities);

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

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



More information about the asterisk-code-review mailing list