mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 15:34:30 +00:00
bgpd: null check (Coverity 1472237)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
25f5f03987
commit
9f134cdcfd
@ -144,9 +144,6 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p,
|
||||
struct bgp_node *node = bgp_node_from_rnode(table->route_table->top);
|
||||
struct bgp_node *matched = NULL;
|
||||
|
||||
if (node == NULL)
|
||||
return;
|
||||
|
||||
while (node && node->p.prefixlen <= p->prefixlen
|
||||
&& prefix_match(&node->p, p)) {
|
||||
if (node->info && node->p.prefixlen == p->prefixlen) {
|
||||
@ -157,6 +154,9 @@ void bgp_table_range_lookup(const struct bgp_table *table, struct prefix *p,
|
||||
&p->u.prefix, node->p.prefixlen)]);
|
||||
}
|
||||
|
||||
if (node == NULL)
|
||||
return;
|
||||
|
||||
if ((matched == NULL && node->p.prefixlen > maxlen) || !node->parent)
|
||||
return;
|
||||
else if (matched == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user