]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Comment on the two remaining scanbuild cases. At first sight these are both false... 11470/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 28 Mar 2022 09:07:46 +0000 (11:07 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 28 Mar 2022 09:11:12 +0000 (11:11 +0200)
pdns/lwres.cc
pdns/recursordist/rec-main.cc

index 933b469b8762433ef2d15456a6aa3abc1125a035..c100c0503739f30959920f52d19f6cc41d6eaab4 100644 (file)
@@ -441,7 +441,7 @@ static LWResult::Result asyncresolve(const ComboAddress& ip, const DNSName& doma
         // work, we give up. For reused connections, we assume the
         // peer has closed it on error, so we retry. At some point we
         // *will* get a new connection, so this loop is not endless.
-        isNew = true; // tcpconnect() might throw for new connections. In that case, we want to break the loop
+        isNew = true; // tcpconnect() might throw for new connections. In that case, we want to break the loop, scanbuild complains here, which is a false positive afaik
         std::string nsName;
         if (context && !context->d_nsName.empty()) {
           nsName = context->d_nsName.toStringNoDot();
index cbf4c85a8a342f1044fe6aabbe56c49bce116114..dc9b1f3e85019925108955e35c9482b57155e946 100644 (file)
@@ -2712,6 +2712,7 @@ struct WipeCacheResult wipeCaches(const DNSName& canon, bool subtree, uint16_t q
 
   try {
     res.record_count = g_recCache->doWipeCache(canon, subtree, qtype);
+    // scanbuild complains here about an allocated function object that is being leaked. Needs investigation
     res.packet_count = broadcastAccFunction<uint64_t>([=] { return pleaseWipePacketCache(canon, subtree, qtype); });
     res.negative_record_count = g_negCache->wipe(canon, subtree);
     if (g_aggressiveNSECCache) {