diff options
author | Russ White <russ@riw.us> | 2018-06-26 17:14:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 17:14:07 +0200 |
commit | 884cc57a9632f93b007dc589981dac1ef415c7e1 (patch) | |
tree | 205567ad527a4053e90a3dd8a63780d351abfb09 /ospfd | |
parent | Merge pull request #2535 from donaldsharp/netlink_talk_fun (diff) | |
parent | eigrpd ospfd: null chk (Coverity 1458168 1455335) (diff) | |
download | frr-884cc57a9632f93b007dc589981dac1ef415c7e1.tar.xz frr-884cc57a9632f93b007dc589981dac1ef415c7e1.zip |
Merge pull request #2547 from pacovn/Coverity_1458168_Dereference_null_return_value
eigrpd ospfd: null check (Coverity 1458168 1455335)
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospfd.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |