From: Donald Sharp Date: Thu, 28 May 2020 12:36:04 +0000 (-0400) Subject: pimd: Fix crash on restart from thread_cancel X-Git-Tag: base_7.5~337^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c58a47ea2e7d2fb173dbdd122a1b65aaaf6c6039;p=matthieu%2Ffrr.git 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 --- 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;