Merge pull request #17191 from louis-6wind/fix-bgp-labels

bgpd: fix uninitialized bgp_labels
This commit is contained in:
Donatas Abraitis 2024-10-24 17:35:36 +03:00 committed by GitHub
commit be3b97d9ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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++)

View File

@ -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;