summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-05-12 23:00:06 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-05-12 23:00:06 +0000
commite43be0edb7b5d87a3afe3a26aa071251018b10f1 (patch)
tree698303cfe81fec852728eb9c8aaa6ab377124bd9 /ospfd/ospf_interface.c
parent70461d793444002cc2ce99e4e62df3c367d9dd50 (diff)
[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.
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 1264cac6..b94cfa3a 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -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)