From a2d7fdfeb013c9cf5ae624ae89ce2f4acec3ba9d Mon Sep 17 00:00:00 2001 From: paco Date: Mon, 25 Jun 2018 15:43:04 +0200 Subject: eigrpd ospfd: null chk (Coverity 1458168 1455335) Signed-off-by: F. Aragon --- ospfd/ospfd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ospfd') diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 4cf38439c..f31542184 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -243,13 +243,14 @@ static struct ospf *ospf_new(unsigned short instance, const char *name) zlog_debug( "%s: Create new ospf instance with vrf_name %s vrf_id %u", __PRETTY_FUNCTION__, name, new->vrf_id); - if (vrf) - ospf_vrf_link(new, vrf); } else { new->vrf_id = VRF_DEFAULT; vrf = vrf_lookup_by_id(VRF_DEFAULT); - ospf_vrf_link(new, vrf); } + + if (vrf) + ospf_vrf_link(new, vrf); + ospf_zebra_vrf_register(new); new->abr_type = OSPF_ABR_DEFAULT; -- cgit v1.2.3