diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-10-24 17:35:36 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-24 17:35:36 +0300 |
| commit | be3b97d9ed770d2c40bfc3ab18c27154ee8e3f2a (patch) | |
| tree | ce0ce20bbbaf19d4278bbf7660cbd8efd893e238 | |
| parent | 91e157f3ae5fabe7b8cc36563cc8c8f9f887cf2f (diff) | |
| parent | 3225b778cafa46be8233f3512737d85872db67dd (diff) | |
Merge pull request #17191 from louis-6wind/fix-bgp-labels
bgpd: fix uninitialized bgp_labels
| -rw-r--r-- | bgpd/bgp_label.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_mplsvpn.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c index af10111600..5db3621738 100644 --- a/bgpd/bgp_label.c +++ b/bgpd/bgp_label.c @@ -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++) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 13da55ffb7..df45cf237e 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -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; |
