From: Mark Andrews Date: Wed, 5 Feb 2020 05:11:11 +0000 (+1100) Subject: 'event' must be non NULL, remove test. X-Git-Tag: v9.16.0~29^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4d08c023238fdbe515dc0ea7c65a7e1370893c1;p=thirdparty%2Fbind9.git 'event' must be non NULL, remove test. 1401 } CID 1453455 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking event suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1402 if (event != NULL) 1403 isc_event_free(ISC_EVENT_PTR(&event)); --- diff --git a/lib/dns/client.c b/lib/dns/client.c index 757fb42136d..ad4342be6a9 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -1393,8 +1393,7 @@ dns_client_startresolve(dns_client_t *client, const dns_name_t *name, isc_mutex_destroy(&rctx->lock); isc_mem_put(mctx, rctx, sizeof(*rctx)); } - if (event != NULL) - isc_event_free(ISC_EVENT_PTR(&event)); + isc_event_free(ISC_EVENT_PTR(&event)); isc_task_detach(&tclone); dns_view_detach(&view);