unordered_map value type, is of std::pair<const Key, T>, hence a copy from const Key to Key is never shallow.

This commit is contained in:
Ian Lee 2016-05-10 13:22:44 +01:00
parent af64702dd0
commit 6985c8f64c

View File

@ -127,14 +127,6 @@ void EncFS_Context::eraseNode(const char *path, FileNode *pl) {
it->second.pop_front();
// if no more references to this file, remove the record all together
if (it->second.empty()) {
// attempts to make use of shallow copy to clear memory used to hold
// unencrypted filenames.. not sure this does any good..
std::string storedName = it->first;
openFiles.erase(it);
storedName.assign(storedName.length(), '\0');
}
}
} // namespace encfs