From 77457cbff14546a6b6173a46c0486767dab60847 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 7 Aug 2014 19:08:41 -0700 Subject: Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after). --- main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 6485b8ff..f13f6ee2 100644 --- a/main.cpp +++ b/main.cpp @@ -702,9 +702,12 @@ int main(int argc,char **argv) int exitCode = 0; bool needsReset = false; + EthernetTapFactory *tapFactory = (EthernetTapFactory *)0; + RoutingTable *routingTable = (RoutingTable *)0; + try { - EthernetTapFactory *tapFactory = ZTCreatePlatformEthernetTapFactory; - RoutingTable *routingTable = ZTCreatePlatformRoutingTable; + tapFactory = ZTCreatePlatformEthernetTapFactory; + routingTable = ZTCreatePlatformRoutingTable; node = new Node(homeDir,tapFactory,routingTable,udpPort,tcpPort,needsReset); @@ -761,6 +764,9 @@ int main(int argc,char **argv) exitCode = 3; } + delete routingTable; + delete tapFactory; + #ifdef __UNIX_LIKE__ Utils::rm((std::string(homeDir)+"/zerotier-one.pid").c_str()); #endif -- cgit v1.2.3