mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
move null ptr check
This commit is contained in:
parent
f54e64365f
commit
d3715132d1
2 changed files with 2 additions and 3 deletions
|
@ -470,8 +470,8 @@ static inline mi_segment_t* mi_checked_ptr_segment(const void* p, const char* ms
|
|||
}
|
||||
#endif
|
||||
|
||||
if mi_unlikely(p == NULL) return NULL;
|
||||
mi_segment_t* const segment = _mi_ptr_segment(p);
|
||||
if mi_unlikely(segment == NULL) return NULL; // checks also for (p==NULL)
|
||||
|
||||
#if (MI_DEBUG>0)
|
||||
if mi_unlikely(!mi_is_in_heap_region(p)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue