bgpd: bgp_static_set ensure dest is still usable.

Again coverity thinks dest may be freed on the first
call but it should not be.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-10 09:45:15 -04:00
parent fce5742122
commit 8c9e7835ae

View File

@ -6715,7 +6715,8 @@ int bgp_static_set(struct vty *vty, bool negate, const char *ip_str,
}
bgp_dest_set_bgp_static_info(dest, NULL);
bgp_dest_unlock_node(dest);
dest = bgp_dest_unlock_node(dest);
assert(dest);
bgp_dest_unlock_node(dest);
} else {
dest = bgp_node_get(table, &p);