Commit 2ceec292 authored by Charlie Fenton's avatar Charlie Fenton Committed by Oliver Bock

When removing entries from hash table, delete only the contents of the cached...

When removing entries from hash table, delete only the contents of the cached data (pointed to by m_data), not the entire MemFSHashObj
parent ac2930af
......@@ -631,7 +631,6 @@ void CBOINCInternetFSHandler::UnchacheMissingItems() {
// We must get next node before deleting this one
node = m_Hash->Next();
if (obj->m_Len == 0) {
delete obj;
m_Hash->Delete(obj->m_Key);
}
}
......@@ -647,7 +646,9 @@ void CBOINCInternetFSHandler::ClearCache() {
MemFSHashObj* obj = (MemFSHashObj*)node->GetData();
// We must get next node before deleting this one
node = m_Hash->Next();
delete obj;
if (obj->m_Data) {
delete[] obj->m_Data;
}
m_Hash->Delete(obj->m_Key);
}
m_bMissingItems = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment