mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-28 04:13:44 +00:00
cleanup must be called with lock held
This commit is contained in:
parent
4c5ec4a018
commit
56bd1f59dd
1 changed files with 1 additions and 1 deletions
|
|
@ -219,12 +219,12 @@ defrag(DiskCache *self) {
|
|||
e->new_offset = current_pos;
|
||||
current_pos += e->data_sz;
|
||||
}
|
||||
cleanup_holes(&self->holes);
|
||||
ok = true;
|
||||
|
||||
cleanup:
|
||||
if (lock_released) mutex(lock);
|
||||
if (ok) {
|
||||
cleanup_holes(&self->holes);
|
||||
safe_close(self->cache_file_fd, __FILE__, __LINE__);
|
||||
self->cache_file_fd = new_cache_file; new_cache_file = -1;
|
||||
for (size_t i = 0; i < num_entries_to_defrag; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue