From c58a47ea2e7d2fb173dbdd122a1b65aaaf6c6039 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 28 May 2020 08:36:04 -0400 Subject: [PATCH] pimd: Fix crash on restart from thread_cancel 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 --- pimd/pim_zlookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index 49c221f8ed..dc4c621e9c 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -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; -- 2.39.5