From cc35bc7c8f99408efd67daeab414c36b28acc996 Mon Sep 17 00:00:00 2001 From: paco Date: Fri, 15 Jun 2018 20:02:23 +0200 Subject: [PATCH] bgpd: null check (Clang scan-build) Signed-off-by: F. Aragon --- bgpd/bgp_mpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 915387ca2d..333d09806e 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -471,7 +471,7 @@ void bgp_info_mpath_update(struct bgp_node *rn, struct bgp_info *new_best, zlog_debug( "%s: starting mpath update, newbest %s num candidates %d old-mpath-count %d", pfx_buf, new_best ? new_best->peer->host : "NONE", - listcount(mp_list), old_mpath_count); + mp_list ? listcount(mp_list) : 0, old_mpath_count); /* * We perform an ordered walk through both lists in parallel. -- 2.39.5