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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 2 09:47:49 CDT 2015


Joshua Colp has submitted this change and it was merged.

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(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved



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: merged
Gerrit-Change-Id: I0ec7fd10d56d90d5a60b12b5a7d6807f265ac5e0
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list