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.
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index afe3acf..f9dc4b0 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -335,6 +335,8 @@
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);
}