Merge pull request #1 from donaldsharp/stable_patches

A small collection of patches that fix issues found by valgrind
This commit is contained in:
David Lamparter 2016-12-16 04:51:12 +01:00 committed by GitHub
commit d5444d27c1
3 changed files with 12 additions and 3 deletions

View File

@ -573,8 +573,9 @@ subgroup_clear_table (struct update_subgroup *subgrp)
SUBGRP_FOREACH_ADJ_SAFE (subgrp, aout, taout) SUBGRP_FOREACH_ADJ_SAFE (subgrp, aout, taout)
{ {
bgp_adj_out_remove_subgroup (aout->rn, aout, subgrp); struct bgp_node *rn = aout->rn;
bgp_unlock_node (aout->rn); bgp_adj_out_remove_subgroup (rn, aout, subgrp);
bgp_unlock_node (rn);
} }
} }

View File

@ -10317,6 +10317,10 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
if (peer->afc[afi][safi]) if (peer->afc[afi][safi])
{ {
memset(dn_flag, '\0', sizeof(dn_flag));
if (peer_dynamic_neighbor(peer))
dn_flag[0] = '*';
if (peer->hostname && bgp_flag_check(bgp, BGP_FLAG_SHOW_HOSTNAME)) if (peer->hostname && bgp_flag_check(bgp, BGP_FLAG_SHOW_HOSTNAME))
sprintf(neighbor_buf, "%s%s(%s) ", dn_flag, peer->hostname, peer->host); sprintf(neighbor_buf, "%s%s(%s) ", dn_flag, peer->hostname, peer->host);
else else

View File

@ -1845,9 +1845,13 @@ route_map_finish (void)
} }
for (i = 1; i < ROUTE_MAP_DEP_MAX; i++) for (i = 1; i < ROUTE_MAP_DEP_MAX; i++)
hash_free(route_map_dep_hash[i]); {
hash_free(route_map_dep_hash[i]);
route_map_dep_hash[i] = NULL;
}
hash_free (route_map_master_hash); hash_free (route_map_master_hash);
route_map_master_hash = NULL;
} }
/* Initialization of route map vector. */ /* Initialization of route map vector. */