mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-12-12 01:14:30 -05:00
move memory_unmap outside of lock scope
This commit is contained in:
parent
b2007ad3d9
commit
6669166fe9
7
malloc.c
7
malloc.c
@ -556,13 +556,14 @@ static void regions_quarantine_deallocate_pages(void *p, size_t size, size_t gua
|
||||
}
|
||||
|
||||
a = regions_quarantine_queue[regions_quarantine_index];
|
||||
if (a.p != NULL) {
|
||||
memory_unmap(a.p, a.size);
|
||||
}
|
||||
regions_quarantine_queue[regions_quarantine_index] = b;
|
||||
regions_quarantine_index = (regions_quarantine_index + 1) % REGION_QUARANTINE_QUEUE_SIZE;
|
||||
|
||||
mutex_unlock(®ions_lock);
|
||||
|
||||
if (a.p != NULL) {
|
||||
memory_unmap(a.p, a.size);
|
||||
}
|
||||
}
|
||||
|
||||
static size_t hash_page(void *p) {
|
||||
|
Loading…
Reference in New Issue
Block a user