From 5db2838abb3be02e308e124cdde25d2f2da3166b Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Thu, 14 Apr 2022 18:39:20 +0300 Subject: [PATCH] Dig: do not hang on TLS context creation errors There was a query_detach() call missing in dig, which could lead to dig hanging on TLS context creation errors. This commit fixes. The error was introduced because the Strict TLS implementation was initially made over an older version of the code, where this extra query_detach() call was not needed. --- bin/dig/dighost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index a4c2865509..7bbd4fafd2 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3035,6 +3035,9 @@ failure_tls: } else { next = NULL; } + if (connectquery != NULL) { + query_detach(&connectquery); + } query_detach(&query); if (next == NULL) { clear_current_lookup();