From 53a7a0651975a325ce56d7933aeab467f193bb65 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Sat, 17 Dec 2016 13:20:59 -0500 Subject: [PATCH] bgpd: fix unitialized value check id'ed by valgrind Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a61899447a..f645da3f2a 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -631,8 +631,9 @@ bgp_info_cmp (struct bgp *bgp, struct bgp_info *new, struct bgp_info *exist, { if (peer_sort (new->peer) == BGP_PEER_IBGP && peer_sort (exist->peer) == BGP_PEER_IBGP - && CHECK_FLAG (mpath_cfg->ibgp_flags, - BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN)) + && (mpath_cfg == NULL || + CHECK_FLAG (mpath_cfg->ibgp_flags, + BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN))) { newm = BGP_CLUSTER_LIST_LENGTH(new->attr); existm = BGP_CLUSTER_LIST_LENGTH(exist->attr); @@ -868,9 +869,8 @@ bgp_info_cmp_compatible (struct bgp *bgp, struct bgp_info *new, struct bgp_info afi_t afi, safi_t safi) { int paths_eq; - struct bgp_maxpaths_cfg mpath_cfg; int ret; - ret = bgp_info_cmp (bgp, new, exist, &paths_eq, &mpath_cfg, 0, __func__); + ret = bgp_info_cmp (bgp, new, exist, &paths_eq, NULL, 0, __func__); if (paths_eq) ret = 0; -- 2.39.5