]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdns-recursor: avoid a memory leak in catch-all exception handler 7073/head
authorRafael Buchbinder <r-bk@users.noreply.github.com>
Tue, 16 Oct 2018 12:39:20 +0000 (15:39 +0300)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 17 Oct 2018 08:10:46 +0000 (10:10 +0200)
This commit prevents a leak of DNSComboWriter in the catch-all exception
handler.

(cherry picked from commit cbb097d8581dbb27d81be3a3022a96b8ad08e295)

pdns/pdns_recursor.cc

index 43601c2f3f30c2394164f1a96429519a371650c2..f2ac9dd2a0eb8df288bfb8ced90fc578aa7ad7e3 100644 (file)
@@ -1344,6 +1344,7 @@ static void startDoResolve(void *p)
   }
   catch(...) {
     L<<Logger::Error<<"Any other exception in a resolver context "<< makeLoginfo(dc) <<endl;
+    delete dc;
   }
 
   g_stats.maxMThreadStackUsage = max(MT->getMaxStackUsage(), g_stats.maxMThreadStackUsage);