From: Matthijs Mekking Date: Tue, 4 Feb 2020 14:13:56 +0000 (+0100) Subject: Fix build X-Git-Tag: v9.14.11~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=076585e611ed838ff64474b4cea0c92d9fd9482d;p=thirdparty%2Fbind9.git Fix build Restore cleanup: label in dns_client_startrequest because it still has one goto for it. --- diff --git a/lib/dns/client.c b/lib/dns/client.c index 945a7628a3a..2d7827807dd 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -1802,11 +1802,14 @@ dns_client_startrequest(dns_client_t *client, dns_message_t *qmessage, isc_refcount_decrement(&client->references); - LOCK(&client->lock); - ISC_LIST_UNLINK(client->reqctxs, ctx, link); - UNLOCK(&client->lock); - isc_mutex_destroy(&ctx->lock); - isc_mem_put(client->mctx, ctx, sizeof(*ctx)); +cleanup: + if (ctx != NULL) { + LOCK(&client->lock); + ISC_LIST_UNLINK(client->reqctxs, ctx, link); + UNLOCK(&client->lock); + isc_mutex_destroy(&ctx->lock); + isc_mem_put(client->mctx, ctx, sizeof(*ctx)); + } isc_event_free(ISC_EVENT_PTR(&event)); isc_task_detach(&tclone);