mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-04 04:05:19 +08:00
bugfix in ei_handmade_aligned_free for null pointers
This commit is contained in:
parent
b365f443a2
commit
a4252584ed
@ -60,7 +60,8 @@ inline void* ei_handmade_aligned_malloc(size_t size)
|
|||||||
/** \internal frees memory allocated with ei_handmade_aligned_malloc */
|
/** \internal frees memory allocated with ei_handmade_aligned_malloc */
|
||||||
inline void ei_handmade_aligned_free(void *ptr)
|
inline void ei_handmade_aligned_free(void *ptr)
|
||||||
{
|
{
|
||||||
free(*(reinterpret_cast<void**>(ptr) - 1));
|
if(ptr)
|
||||||
|
free(*(reinterpret_cast<void**>(ptr) - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \internal allocates \a size bytes. The returned pointer is guaranteed to have 16 bytes alignment.
|
/** \internal allocates \a size bytes. The returned pointer is guaranteed to have 16 bytes alignment.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user