summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-07 19:08:41 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-07 19:08:41 -0700
commit77457cbff14546a6b6173a46c0486767dab60847 (patch)
treeb9c5a7453d89678ed46cc51e51c2387c212e8055 /main.cpp
parentdb0d17cebba67dec344ee63c3b8ecbdc46f2814a (diff)
downloadinfinitytier-77457cbff14546a6b6173a46c0486767dab60847.tar.gz
infinitytier-77457cbff14546a6b6173a46c0486767dab60847.zip
Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after).
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp10
1 files changed, 8 insertions, 2 deletions
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