summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ext.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-14 05:37:08 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-14 05:40:54 +0100
commit9b50aa1fd3f38eb34d77b9ae7e848b35bc814bfc (patch)
treeabce0e2c4baea59d678a3de9d6239c85ed598f9e /ospfd/ospf_ext.c
parentospf6d: Fix a possible deref by null found in SA (diff)
downloadfrr-9b50aa1fd3f38eb34d77b9ae7e848b35bc814bfc.tar.xz
frr-9b50aa1fd3f38eb34d77b9ae7e848b35bc814bfc.zip
ospfd: Fix some new SA issues found by coverity
Fix a || && mixup. Add an assert for area to show we expect it to be non-null going forward. When memory is allocated if it fails we abort then no need to check for null. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_ext.c')
-rw-r--r--ospfd/ospf_ext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index d42476b6d..d7faf4b0d 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -175,7 +175,7 @@ void ospf_ext_term(void)
{
if ((OspfEXT.scope != OSPF_OPAQUE_AREA_LSA)
- || (OspfEXT.scope != OSPF_OPAQUE_AS_LSA))
+ && (OspfEXT.scope != OSPF_OPAQUE_AS_LSA))
zlog_warn(
"EXT: Unable to unregister Extended Prefix "
"Opaque LSA functions: Wrong scope!");