Memory allocations that fail crash the program. Checking
for NULL is not going to do anything.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
static struct bgp_path_info_mpath *bgp_path_info_mpath_new(void)
{
struct bgp_path_info_mpath *new_mpath;
+
new_mpath = XCALLOC(MTYPE_BGP_MPATH_INFO,
sizeof(struct bgp_path_info_mpath));
+
return new_mpath;
}
if (!path->mpath) {
mpath = bgp_path_info_mpath_new();
- if (!mpath)
- return NULL;
path->mpath = mpath;
mpath->mp_info = path;
}