summaryrefslogtreecommitdiff
path: root/zebra/zebra_pw.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-08-12 10:40:33 +0300
committerGitHub <noreply@github.com>2022-08-12 10:40:33 +0300
commit1bf9112c24e2439d34ac831eaf308124a4010b4a (patch)
treefd71a16154a4c3683e05ec22002148859753a592 /zebra/zebra_pw.c
parent9951799fd3c14c21e5ddd26bec3f0d2803fcc695 (diff)
parent86c4fdfac8feef6766615a5687c1aff560c99e23 (diff)
Merge pull request #11789 from donaldsharp/pw_shutdown
zebra: Fix crash in shutdown w/ pw thread still running
Diffstat (limited to 'zebra/zebra_pw.c')
-rw-r--r--zebra/zebra_pw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/zebra/zebra_pw.c b/zebra/zebra_pw.c
index 6dde513f40..be089fc759 100644
--- a/zebra/zebra_pw.c
+++ b/zebra/zebra_pw.c
@@ -101,13 +101,15 @@ void zebra_pw_del(struct zebra_vrf *zvrf, struct zebra_pw *pw)
if (pw->status == PW_FORWARDING) {
hook_call(pw_uninstall, pw);
dplane_pw_uninstall(pw);
- } else if (pw->install_retry_timer)
- THREAD_OFF(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);
}
@@ -230,7 +232,6 @@ static void zebra_pw_install_retry(struct thread *thread)
{
struct zebra_pw *pw = THREAD_ARG(thread);
- pw->install_retry_timer = NULL;
zebra_pw_install(pw);
}