mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 00:56:19 +00:00
Merge pull request #2781 from pacovn/Coverity_1472237_null_check
bgpd: null check (Coverity 1472237)
This commit is contained in:
commit
718b02697d
@ -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