Skip to content
Snippets Groups Projects
Commit 5f576ac3 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix memory

parent 1d736deb
No related branches found
No related tags found
No related merge requests found
......@@ -116,8 +116,9 @@ bool DataCache::CleanOldSlots(uint64_t size) {
if (meta_[i]->lock > 0) return false;
}
meta_.erase(meta_.begin(), meta_.begin() + last_del + 1);
if (last_del >=0) {
meta_.erase(meta_.begin(), meta_.begin() + last_del + 1);
}
return true;
}
......@@ -134,4 +135,4 @@ bool DataCache::UnlockSlot(CacheMeta* meta) {
return true;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment