]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] CID #27, fix missing NULL return check
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:00:06 +0000 (23:00 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:00:06 +0000 (23:00 +0000)
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.

ospfd/ChangeLog
ospfd/ospf_interface.c

index a11c7c970e248bc37dfd5747f68e88d5dc4c9ce1..8cb115c669592ec7324433b5ab7e7f608f63283a 100644 (file)
@@ -5,6 +5,8 @@
          functionality which is never used, hence fixing Coverity CID
          #29.
          (struct lsa_action) remove unused member.
+       * ospf_interface.c: (ospf_if_exists) Fix missing NULL return
+         check on ospf_lookup, CID #27.
 
 2006-05-11 Paul Jakma <paul.jakma@sun.com>
 
index 1264cac6b4e03103ff1a9482a1969427f6712e74..b94cfa3ac2144cb94f63501a8ed8a0d8fe422abc 100644 (file)
@@ -397,7 +397,8 @@ ospf_if_exists (struct ospf_interface *oic)
   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)