diff options
| author | Rajesh Varatharaj <rvaratharaj@nvidia.com> | 2023-08-15 11:13:20 -0700 |
|---|---|---|
| committer | Rajesh Varatharaj <rvaratharaj@nvidia.com> | 2023-08-15 11:14:16 -0700 |
| commit | d33bd631262d60a7c0a2d56a2fe143bff45e32f0 (patch) | |
| tree | 1376c6340d41c933295352d219963e6bf9e16f66 | |
| parent | 2b4e03871166265ee82003b89d5e82a378478a97 (diff) | |
bgpd: fix coverity issue in bgpd
Should address this issue:
** CID 1566843: Uninitialized variables (UNINIT)
/bgpd/bgp_route.c: 6754 in bgp_static_set()
6748 bgp_static->backdoor = backdoor;
6749 bgp_static->valid = 0;
6750 bgp_static->igpmetric = 0;
6751 bgp_static->igpnexthop.s_addr = INADDR_ANY;
6752 bgp_static->label_index = label_index;
6753 bgp_static->label = label;
>>> CID 1566843: Uninitialized variables (UNINIT)
>>> Using uninitialized value prd.
6754 bgp_static->prd = prd;
6755
6756 if (rmap) {
6757 XFREE(MTYPE_ROUTE_MAP_NAME,
6758 bgp_static->rmap.name);
6759 route_map_counter_decrement(
Testing Done:
build
Ticket: #NA
Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
| -rw-r--r-- | bgpd/bgp_route.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 457db79c43..3b3cbb28a9 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6610,6 +6610,7 @@ int bgp_static_set(struct vty *vty, bool negate, const char *ip_str, } if (safi == SAFI_MPLS_VPN || safi == SAFI_EVPN) { + memset(&prd, 0, sizeof(prd)); ret = str2prefix_rd(rd_str, &prd); if (!ret) { vty_out(vty, "%% Malformed rd\n"); |
