]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix use-after-free on DoT initialization failure
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 15 Feb 2019 12:16:51 +0000 (13:16 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 15 Feb 2019 12:16:51 +0000 (13:16 +0100)
pdns/dnsdist.cc

index b8519f6f9d7bd1954d9befb0c0bb0c5f172022a6..58bbe62d873ae5729a706f0f3f4866f75d7148ce 100644 (file)
@@ -2708,8 +2708,8 @@ try
       tcpBindsCount++;
     }
     else {
-      delete cs;
       errlog("Error while setting up TLS on local address '%s', exiting", cs->local.toStringWithPort());
+      delete cs;
       _exit(EXIT_FAILURE);
     }
   }