From cfd670f3af25dfc34d5c06e30d21160e3dfb6421 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Thu, 15 Apr 2010 11:39:05 +0100 Subject: 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. --- ospfd/ospf_interface.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- cgit v1.2.1