From: Remi Gacogne Date: Wed, 15 Dec 2021 11:19:11 +0000 (+0100) Subject: dnsdist: Clarify that if the call failed we still own the DOHUnit X-Git-Tag: auth-4.7.0-alpha1~122^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11075%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Clarify that if the call failed we still own the DOHUnit --- 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) {