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

This reverts commit 6985c8f64c.
This commit is contained in:
Ian Lee 2016-05-12 17:03:10 +01:00
parent 2fe6f89925
commit 6ad5cd4225

View File

@ -127,6 +127,14 @@ 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