From e43be0edb7b5d87a3afe3a26aa071251018b10f1 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 12 May 2006 23:00:06 +0000 Subject: [ospfd] CID #27, fix missing NULL return check 2006-05-12 Paul Jakma * ospf_interface.c: (ospf_if_exists) Fix missing NULL return check on ospf_lookup, CID #27. --- ospfd/ChangeLog | 2 ++ ospfd/ospf_interface.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'ospfd') diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index a11c7c97..8cb115c6 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -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 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) -- cgit v1.2.1