]> granicus.if.org Git - pdns/commitdiff
pdns-recursor: avoid a memory leak in catch-all exception handler
authorRafael Buchbinder <r-bk@users.noreply.github.com>
Tue, 16 Oct 2018 12:39:20 +0000 (15:39 +0300)
committerRafael Buchbinder <r-bk@users.noreply.github.com>
Tue, 16 Oct 2018 12:43:09 +0000 (15:43 +0300)
This commit prevents a leak of DNSComboWriter in the catch-all exception
handler.

pdns/pdns_recursor.cc

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