summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-12-09 23:23:32 +0100
committerStephen Worley <sworley@nvidia.com>2023-02-14 00:12:05 +0100
commit5313cd675885ec0f8fcc201c539b2920eeb5c5fa (patch)
treef648e80b901f1455eff0bd38ea93faf505956781 /bgpd/bgp_zebra.c
parentzebra: state value never used SA fix (diff)
downloadfrr-5313cd675885ec0f8fcc201c539b2920eeb5c5fa.tar.xz
frr-5313cd675885ec0f8fcc201c539b2920eeb5c5fa.zip
bgpd: SA set labels/num_labels to NULL/0
Static Analysis caught a bug where we could be reading garbage values for labels/num_lables. Fix that by ensuring it's set to NULL/0 per loop of the mpath. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_zebra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index c1b27688d..3a6198990 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1404,6 +1404,8 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
}
for (; mpinfo; mpinfo = bgp_path_info_mpath_next(mpinfo)) {
+ labels = NULL;
+ num_labels = 0;
uint32_t nh_weight;
bool is_evpn;
bool is_parent_evpn;