if (pw->status == PW_FORWARDING) {
hook_call(pw_uninstall, pw);
dplane_pw_uninstall(pw);
- } else if (pw->install_retry_timer)
- thread_cancel(&pw->install_retry_timer);
+ }
+
+ THREAD_OFF(pw->install_retry_timer);
/* unlink and release memory */
RB_REMOVE(zebra_pw_head, &zvrf->pseudowires, pw);
if (pw->protocol == ZEBRA_ROUTE_STATIC)
RB_REMOVE(zebra_static_pw_head, &zvrf->static_pseudowires, pw);
+
XFREE(MTYPE_PW, pw);
}
{
struct zebra_pw *pw = THREAD_ARG(thread);
- pw->install_retry_timer = NULL;
zebra_pw_install(pw);
}