[ospfd] CID #27, fix missing NULL return check

2006-05-12 Paul Jakma <paul.jakma@sun.com>

	* ospf_interface.c: (ospf_if_exists) Fix missing NULL return
	  check on ospf_lookup, CID #27.
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 1264cac..b94cfa3 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -397,7 +397,8 @@
   struct ospf *ospf;
   struct ospf_interface *oi;
 
-  ospf = ospf_lookup ();
+  if ((ospf = ospf_lookup ()) == NULL)
+    return NULL;
 
   for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
     if (oi == oic)