bgpd: bgp_afi_node_get teach coverity about unlocking

The pdest pointer is locked by the bgp_node_get so
unlocking it should be fine and it should still exist.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-10 09:55:24 -04:00
parent 1195c44f4b
commit ecb8460482

View File

@ -138,7 +138,9 @@ struct bgp_dest *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
bgp_dest_set_bgp_table_info(
pdest, bgp_table_init(table->bgp, afi, safi));
else
bgp_dest_unlock_node(pdest);
pdest = bgp_dest_unlock_node(pdest);
assert(pdest);
table = bgp_dest_get_bgp_table_info(pdest);
}