security: Fix some typos and potential NULL-deref
This patch against the git tree fixes minor typos, some of them possibily
leading to NULL-pointer dereference in rare conditions.
Signed-off-by: Remi Gacogne <rgacogne-github@coredump.fr>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 587564a..c605ce6 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -1036,7 +1036,8 @@
/* If the lsa's age reached to MaxAge, start flushing procedure. */
if (IS_LSA_MAXAGE (lsa))
{
- lp->flags &= ~LPFLG_LSA_ENGAGED;
+ if (lp)
+ lp->flags &= ~LPFLG_LSA_ENGAGED;
ospf_opaque_lsa_flush_schedule (lsa);
goto out;
}