summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_snmp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-04-17 02:16:02 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-04-17 02:16:02 +0200
commitb2145a4004cd6005297181b371fc51b8fbf391ec (patch)
tree2f0479f2d19f58a894b4f5c98c5f6bd68521aa1c /ospfd/ospf_snmp.c
parentzebra: in_addr_cmp and `struct prefix` are not happy (diff)
downloadfrr-b2145a4004cd6005297181b371fc51b8fbf391ec.tar.xz
frr-b2145a4004cd6005297181b371fc51b8fbf391ec.zip
ospfd: Fix possible null deref
It is possible that area is null, let's ensure it isn't. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r--ospfd/ospf_snmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 550e5ee9e..63191d5cb 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -784,7 +784,7 @@ static struct ospf_area *ospfStubAreaLookup(struct variable *v, oid name[],
area = ospf_area_lookup_by_area_id(ospf, *addr);
- if (area->external_routing == OSPF_AREA_STUB)
+ if (area && area->external_routing == OSPF_AREA_STUB)
return area;
else
return NULL;