bgpd: bgp_show_route_in_table ensure rm exists

The rm exists because it is locked while we are walking it,
so this should be safe.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-10 09:38:56 -04:00
parent 271c00074f
commit 6c61eba773

View File

@ -12146,7 +12146,9 @@ static int bgp_show_route_in_table(struct vty *vty, struct bgp *bgp,
rm_p); rm_p);
if (type5_pfxlen == match.prefixlen) { if (type5_pfxlen == match.prefixlen) {
is_exact_pfxlen_match = true; is_exact_pfxlen_match = true;
bgp_dest_unlock_node(rm); rm = bgp_dest_unlock_node(rm);
assert(rm);
break; break;
} }
} }