diff options
author | paco <paco@voltanet.io> | 2018-06-20 18:57:16 +0200 |
---|---|---|
committer | paco <paco@voltanet.io> | 2018-06-20 18:57:16 +0200 |
commit | cac84a16112b4b8cd875391589e5226d601fa922 (patch) | |
tree | cce2a48d4e1b996e10adfecb043d678507cb77b9 /ospf6d/ospf6_spf.c | |
parent | Merge pull request #2459 from pacovn/Coverity_1469898_Uninitialized_scalar_va... (diff) | |
download | frr-cac84a16112b4b8cd875391589e5226d601fa922.tar.xz frr-cac84a16112b4b8cd875391589e5226d601fa922.zip |
bgpd ospf6d: null check (Coverity 1221453 1461297)
Diffstat (limited to 'ospf6d/ospf6_spf.c')
-rw-r--r-- | ospf6d/ospf6_spf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 28c345982..5b6691e6b 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -677,6 +677,10 @@ void ospf6_spf_schedule(struct ospf6 *ospf6, unsigned int reason) { unsigned long delay, elapsed, ht; + /* OSPF instance does not exist. */ + if (ospf6 == NULL) + return; + ospf6_set_spf_reason(ospf6, reason); if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME)) { @@ -686,10 +690,6 @@ void ospf6_spf_schedule(struct ospf6 *ospf6, unsigned int reason) rbuf); } - /* OSPF instance does not exist. */ - if (ospf6 == NULL) - return; - /* SPF calculation timer is already scheduled. */ if (ospf6->t_spf_calc) { if (IS_OSPF6_DEBUG_SPF(PROCESS) || IS_OSPF6_DEBUG_SPF(TIME)) |