From 9d53151a282e9a98f75d28e8fcbff7901a07b592 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 15 Dec 2021 12:19:11 +0100 Subject: [PATCH] dnsdist: Clarify that if the call failed we still own the DOHUnit --- pdns/dnsdistdist/doh.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/doh.cc b/pdns/dnsdistdist/doh.cc index e6f6594677..c0dfba3e59 100644 --- a/pdns/dnsdistdist/doh.cc +++ b/pdns/dnsdistdist/doh.cc @@ -726,7 +726,8 @@ static void processDOHQuery(DOHUnitUniquePtr&& du) int fd = pickBackendSocketForSending(du->downstream); try { - /* you can't touch du after this line, because it might already have been freed */ + /* you can't touch du after this line, unless the call returned a non-negative value, + because it might already have been freed */ ssize_t ret = udpClientSendRequestToBackend(du->downstream, fd, du->query); if (ret < 0) { -- 2.47.2