From: Otto Moerbeek Date: Mon, 2 May 2022 07:27:45 +0000 (+0200) Subject: Tweak for Coverity 1488422. X-Git-Tag: auth-4.8.0-alpha0~112^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11599%2Fhead;p=thirdparty%2Fpdns.git Tweak for Coverity 1488422. The spot where the warning happens changed, plus appease clang-tidy. --- diff --git a/pdns/signingpipe.cc b/pdns/signingpipe.cc index 30bd41a812..0198686d5c 100644 --- a/pdns/signingpipe.cc +++ b/pdns/signingpipe.cc @@ -201,13 +201,13 @@ void ChunkedSigningPipe::sendRRSetToWorker() // it sounds so socialist! shuffle(rwVect.second.begin(), rwVect.second.end(), pdns::dns_random_engine()); // pick random available worker auto ptr = d_rrsetToSign.get(); writen2(*rwVect.second.begin(), &ptr, sizeof(ptr)); - d_rrsetToSign.release(); + // coverity[leaked_storage] + static_cast(d_rrsetToSign.release()); d_rrsetToSign = make_unique(); d_outstandings[*rwVect.second.begin()]++; d_outstanding++; d_queued++; wantWrite=false; - // coverity[leaked_storage] } if(wantRead) { @@ -252,12 +252,12 @@ void ChunkedSigningPipe::sendRRSetToWorker() // it sounds so socialist! shuffle(rwVect.second.begin(), rwVect.second.end(), pdns::dns_random_engine()); // pick random available worker auto ptr = d_rrsetToSign.get(); writen2(*rwVect.second.begin(), &ptr, sizeof(ptr)); - d_rrsetToSign.release(); + // coverity[leaked_storage] + static_cast(d_rrsetToSign.release()); d_rrsetToSign = make_unique(); d_outstandings[*rwVect.second.begin()]++; d_outstanding++; d_queued++; - // coverity[leaked_storage] } }