diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-18 00:14:12 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-18 00:14:12 -0700 |
commit | 7831c4bfef2c340de01ff08461bd7f6a0e54ce32 (patch) | |
tree | 0726bc6c54ea7c389fcb972a8f672fbee0183153 /node/Topology.cpp | |
parent | 5f45977e3e3b912269ed5745423ad330be803964 (diff) | |
download | infinitytier-7831c4bfef2c340de01ff08461bd7f6a0e54ce32.tar.gz infinitytier-7831c4bfef2c340de01ff08461bd7f6a0e54ce32.zip |
Cleanup, dead code removal, some pretty insignificant security stuff that's based on recommendations.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r-- | node/Topology.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp index d4df3ce6..d88b64ca 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -239,13 +239,16 @@ void Topology::_dumpPeers() if (fwrite(buf.data(),buf.size(),1,pd) != 1) { fclose(pd); Utils::rm(pdpath); + buf.burn(); return; } buf.clear(); + buf.burn(); } } catch ( ... ) { fclose(pd); Utils::rm(pdpath); + buf.burn(); return; } } @@ -254,12 +257,15 @@ void Topology::_dumpPeers() if (fwrite(buf.data(),buf.size(),1,pd) != 1) { fclose(pd); Utils::rm(pdpath); + buf.burn(); return; } + buf.burn(); } fclose(pd); Utils::lockDownFile(pdpath.c_str(),false); + buf.burn(); } void Topology::_loadPeers() @@ -301,6 +307,7 @@ void Topology::_loadPeers() fclose(pd); Utils::rm(pdpath); + buf.burn(); } } // namespace ZeroTier |