diff options
| author | F. Aragon <paco@voltanet.io> | 2018-11-20 12:50:05 +0100 | 
|---|---|---|
| committer | F. Aragon <paco@voltanet.io> | 2018-11-20 12:51:27 +0100 | 
| commit | 32fbbd9c7d92d4223b126835bec4b894c546deba (patch) | |
| tree | 94cc9c8714b9c6a56d60ed1ff86c76b0da01eab5 /bgpd | |
| parent | dc079d4f7a311f5876f84f606cb2cd199783922d (diff) | |
bgpd: null check (Coverity 1475469)
Null check of 'rn' returned by bgp_node_lookup() because it could be
deferenced afterwards into bgp_nexthop_get_node_info()
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_nht.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 0dce96f432..c5d12a5706 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -866,6 +866,8 @@ void bgp_nht_register_enhe_capability_interfaces(struct peer *peer)  	if (p.family != AF_INET6)  		return;  	rn = bgp_node_lookup(bgp->nexthop_cache_table[AFI_IP6], &p); +	if (!rn) +		return;  	bnc = bgp_nexthop_get_node_info(rn);  	if (!bnc)  | 
