]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2003-11-10 Claus Endres <claus@endresconsulting.com>
authorpaul <paul>
Mon, 10 Nov 2003 23:56:29 +0000 (23:56 +0000)
committerpaul <paul>
Mon, 10 Nov 2003 23:56:29 +0000 (23:56 +0000)
        * ospfd/ospf_interface.c: (ospf_if_table_lookup) grab reference to
          rn->info /before/ calling route_unlock_node() as some systems
          may deliberately poison freed memory, eg FreeBSD 5.1.
          see [quagga-dev 417].

ospfd/ospf_interface.c

index 2519ec9ce578897998eea62559823294de3be149..2afe19ec3f50b50fca436970ccc89a0c5f9fad10 100644 (file)
@@ -131,13 +131,15 @@ ospf_if_table_lookup (struct interface *ifp, struct prefix *prefix)
 {
   struct prefix p;
   struct route_node *rn;
+  struct ospf_interface *rninfo;
   
   p = *prefix;
 
   rn = route_node_get (IF_OIFS (ifp), &p);
   /* route_node_get implicitely locks */
+  rninfo = (struct ospf_interface *) rn->info;
   route_unlock_node (rn);
-  return (struct ospf_interface *) rn->info;
+  return rninfo;
 }
 
 void