diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-07 19:08:41 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-07 19:08:41 -0700 |
| commit | 77457cbff14546a6b6173a46c0486767dab60847 (patch) | |
| tree | b9c5a7453d89678ed46cc51e51c2387c212e8055 /main.cpp | |
| parent | db0d17cebba67dec344ee63c3b8ecbdc46f2814a (diff) | |
| download | infinitytier-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.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |
