]> git.puffer.fish Git - mirror/frr.git/commitdiff
Add a null check to ensure that another thread
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:24:41 +0000 (17:24 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:24:41 +0000 (17:24 -0700)
does not access the address in the deletion path
of the interface.

Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
ospfd/ospf_dump.c

index ebcc717ff319e472b46f97fcc3f1e4edfeb1604a..de62e0b7fad732644da8f72f57eac454fc7b713a 100644 (file)
@@ -204,7 +204,7 @@ ospf_if_name_string (struct ospf_interface *oi)
   static char buf[OSPF_IF_STRING_MAXLEN] = "";
   u_int32_t ifaddr;
 
-  if (!oi)
+  if (!oi || !oi->address)
     return "inactive";
 
   if (oi->type == OSPF_IFTYPE_VIRTUALLINK)