summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2010-04-15 11:39:05 +0100
committerPaul Jakma <paul@quagga.net>2010-12-08 17:11:17 +0000
commitcfd670f3af25dfc34d5c06e30d21160e3dfb6421 (patch)
tree6b2888d0ac50a60416a92a7226cf513b0537f14f
parentec70497bc5eac732139c3d94987ecb6691557795 (diff)
ospfd: ospf_if_free can leave dangling references on ISM events - cancel them
* ospf_interface.c: (ospf_if_free) events with dangling pointers left scheduled can be seriously bad for ospfd's health. Cancel the event.
-rw-r--r--ospfd/ospf_interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index afe3acf1..f9dc4b09 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -335,6 +335,8 @@ ospf_if_free (struct ospf_interface *oi)
listnode_delete (oi->ospf->oiflist, oi);
listnode_delete (oi->area->oiflist, oi);
+ thread_cancel_event (master, oi);
+
memset (oi, 0, sizeof (*oi));
XFREE (MTYPE_OSPF_IF, oi);
}