mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-09-18 04:04:47 +03:00
Only abort double free if secure mode is on
This commit is contained in:
parent
f6285b33af
commit
b44fe110bd
1 changed files with 4 additions and 0 deletions
|
@ -212,7 +212,11 @@ static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* page, con
|
|||
mi_list_contains(page, page->local_free, block) ||
|
||||
mi_list_contains(page, mi_page_thread_free(page), block))
|
||||
{
|
||||
#if (MI_SECURE > 0)
|
||||
_mi_error_message(EFAULT, "double free detected of block %p with size %zu\n", block, mi_page_block_size(page));
|
||||
#else
|
||||
_mi_error_message(EAGAIN, "double free detected of block %p with size %zu\n", block, mi_page_block_size(page));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue