summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_spf.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-20 18:57:16 +0200
committerpaco <paco@voltanet.io>2018-06-20 18:57:16 +0200
commitcac84a16112b4b8cd875391589e5226d601fa922 (patch)
treecce2a48d4e1b996e10adfecb043d678507cb77b9 /ospf6d/ospf6_spf.c
parentMerge pull request #2459 from pacovn/Coverity_1469898_Uninitialized_scalar_va... (diff)
downloadfrr-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.c8
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))