From 244ebdfb8c77d5d694309b9be587374f21c04490 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 2 Jul 2020 16:21:20 +1000 Subject: [PATCH] remove redundant rctx != NULL check (cherry picked from commit 2fa2dbd5fb9a3e7bc3cf29eff6b198581942d7b8) --- lib/dns/client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dns/client.c b/lib/dns/client.c index b78a35306a..cb74157f16 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -1416,10 +1416,8 @@ cleanup: if (sigrdataset != NULL) { putrdataset(client->mctx, &sigrdataset); } - if (rctx != NULL) { - isc_mutex_destroy(&rctx->lock); - isc_mem_put(mctx, rctx, sizeof(*rctx)); - } + isc_mutex_destroy(&rctx->lock); + isc_mem_put(mctx, rctx, sizeof(*rctx)); isc_event_free(ISC_EVENT_PTR(&event)); isc_task_detach(&tclone); dns_view_detach(&view);