Ensure that the rm and dest exist since the code
has them locked to loop over them safely.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_static_free(bgp_static);
bgp_dest_set_bgp_static_info(rm,
NULL);
- bgp_dest_unlock_node(rm);
+ rm = bgp_dest_unlock_node(rm);
+ assert(rm);
}
} else {
bgp_static = bgp_dest_get_bgp_static_info(dest);
afi, safi, NULL);
bgp_static_free(bgp_static);
bgp_dest_set_bgp_static_info(dest, NULL);
- bgp_dest_unlock_node(dest);
+ dest = bgp_dest_unlock_node(dest);
+ assert(dest);
}
}
}