]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix crash on restart from thread_cancel 6475/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 28 May 2020 12:36:04 +0000 (08:36 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 28 May 2020 12:53:13 +0000 (08:53 -0400)
We were using thread_cancel() directly instead of
THREAD_OFF which correctly ensures the pointer is not NULL.

Ticket:CM-29866
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_zlookup.c

index 49c221f8ed6c77c86100ac61d4e17215379c29e9..dc4c621e9c452bbd27b6dbc9588763e67dfa3f8c 100644 (file)
@@ -125,7 +125,7 @@ static void zclient_lookup_failed(struct zclient *zlookup)
 
 void zclient_lookup_free(void)
 {
-       thread_cancel(zlookup_read);
+       THREAD_OFF(zlookup_read);
        zclient_stop(zlookup);
        zclient_free(zlookup);
        zlookup = NULL;