]> granicus.if.org Git - pdns/commitdiff
prevent crash after --list-modules, probably caused by calls to destructors in dynami...
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 5 May 2015 14:45:44 +0000 (16:45 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 5 May 2015 14:45:44 +0000 (16:45 +0200)
pdns/receiver.cc

index 7df07ca2c13d0fe67dd609b0b80dcf32393d34c8..c7d6081a3b97af40fbac9e15f7e7d22d51241151 100644 (file)
@@ -503,12 +503,12 @@ int main(int argc, char **argv)
     }
 
     if(::arg().mustDo("list-modules")) {
-      vector<string>modules=BackendMakers().getModules();
-      cerr<<"Modules available:"<<endl;
-      for(vector<string>::const_iterator i=modules.begin();i!=modules.end();++i)
-        cout<<*i<<endl;
+      auto modules = BackendMakers().getModules();
+      cout<<"Modules available:"<<endl;
+      for(const auto& m : modules)
+        cout<< m <<endl;
 
-      exit(99);
+      _exit(99);
     }
 
     if(!::arg().asNum("local-port")) {