Skip to content

Commit

Permalink
Merge pull request #17191 from louis-6wind/fix-bgp-labels
Browse files Browse the repository at this point in the history
bgpd: fix uninitialized bgp_labels
  • Loading branch information
ton31337 authored Oct 24, 2024
2 parents 91e157f + 3225b77 commit be3b97d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void *bgp_labels_hash_alloc(void *p)
struct bgp_labels *new;
uint8_t i;

new = XMALLOC(MTYPE_BGP_LABELS, sizeof(struct bgp_labels));
new = XCALLOC(MTYPE_BGP_LABELS, sizeof(struct bgp_labels));

new->num_labels = labels->num_labels;
for (i = 0; i < labels->num_labels; i++)
Expand Down
4 changes: 2 additions & 2 deletions bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1613,8 +1613,8 @@ void vpn_leak_from_vrf_update(struct bgp *to_bgp, /* to */
struct attr static_attr = {0};
struct attr *new_attr = NULL;
safi_t safi = SAFI_MPLS_VPN;
mpls_label_t label_val;
mpls_label_t label;
mpls_label_t label_val = { 0 };
mpls_label_t label = { 0 };
struct bgp_dest *bn;
const char *debugmsg;
int nexthop_self_flag = 0;
Expand Down

0 comments on commit be3b97d

Please sign in to comment.