Merge "chan_vpb.cc: Fix compiler warning Jenkins found."
authorJoshua Colp <jcolp@digium.com>
Thu, 2 Jul 2015 14:47:58 +0000 (09:47 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Thu, 2 Jul 2015 14:47:58 +0000 (09:47 -0500)
channels/chan_vpb.cc

index 16a66b9..7cdcf30 100644 (file)
@@ -2628,14 +2628,13 @@ static int unload_module(void)
 
        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);