mirror of https://github.com/BOINC/boinc.git
When removing entries from hash table, delete only the contents of the cached data (pointed to by m_data), not the entire MemFSHashObj
This commit is contained in:
parent
ac2930af0b
commit
2ceec2926e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue