Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after).
This commit is contained in:
parent
db0d17cebb
commit
77457cbff1
8 changed files with 44 additions and 15 deletions
10
main.cpp
10
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue