diff options
author | paul <paul> | 2003-11-10 23:56:29 +0000 |
---|---|---|
committer | paul <paul> | 2003-11-10 23:56:29 +0000 |
commit | f5719d4aea1ff9ae16e6f10ecd6b064db561c4e7 (patch) | |
tree | 83f7d84c9f8b0d3ae5bd6182374a21dd8a7e6c67 | |
parent | 7c4e0e53e26d8bea829eaa57ff5bb16ca6314417 (diff) | |
download | quagga-f5719d4aea1ff9ae16e6f10ecd6b064db561c4e7.tar.bz2 quagga-f5719d4aea1ff9ae16e6f10ecd6b064db561c4e7.tar.xz |
2003-11-10 Claus Endres <claus@endresconsulting.com>
* 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].
-rw-r--r-- | ospfd/ospf_interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 2519ec9c..2afe19ec 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -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 |