summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-03-09 17:37:44 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-03-23 02:21:42 +0100
commita459f4df16eca156cb7c6def4a758fd89c9fa504 (patch)
tree76114bb4ac2067bda047e2989d4746abb7a31a5a
parent62a4ad365760afae485ae61c5aab734012545be4 (diff)
OSPF: Fix reading from freed memory
Thanks to Pavel Tvrdik for noticing it.
-rw-r--r--proto/ospf/neighbor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index c5d44dec..0223ccdf 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -108,6 +108,7 @@ ospf_neigh_down(struct ospf_neighbor *n)
{
struct ospf_iface *ifa = n->ifa;
struct ospf_proto *p = ifa->oa->po;
+ u32 rid = n->rid;
if ((ifa->type == OSPF_IT_NBMA) || (ifa->type == OSPF_IT_PTMP))
{
@@ -121,7 +122,7 @@ ospf_neigh_down(struct ospf_neighbor *n)
rem_node(NODE n);
rfree(n->pool);
- OSPF_TRACE(D_EVENTS, "Neighbor %R on %s removed", n->rid, ifa->ifname);
+ OSPF_TRACE(D_EVENTS, "Neighbor %R on %s removed", rid, ifa->ifname);
}
/**